Tuesday 26 January 2016

Convert PHP array into JSON object?

I'm very new to node and I'm having some trouble figuring out how to convert a PHP serialized array into something useful for node.I have installed the php-unserialize package, but I'm struggling with getting the strong it generates into a usable JSON object.Here is a snippet of my current code and output: http://ift.tt/23qRnz7, I want to be able to use something like object.form_title and have it return "Conditional Logic Example", but I don't seem to be able to do that. If I use JSON.parse(formObject), I get an error from the parser.

Submitted January 26, 2016 at 04:07PM by ZachSka87

No comments:

Post a Comment