I hope someone can help me, I have an AJAX call which loads some data from a database and returns it as JSON. The code I use is:
This works fine and returns the JSON and dumps the lot in the browser. However, I am having trouble parsing the file and getting the details I want from it. The file is structured as so:
Say I want to get the colour for each floorplan item. How do I go about doing this? I was thinking something like:
But it just returns the error
Any help is much appreciated!
EDIT: Never mind, fixed it myself. Apparently it was returning a string not an object so I had to use the eval() function to convert the string to an object. Now works perfectly!
You must be logged in to reply to this topic.