I\'ve been smashing my head against a brick wall with this one, i\'ve tried loads of the solutions on stackoverflow but can\'t find one that works!
Basically when I
I recommend you use:
var returnedData = JSON.parse(data);
to convert the JSON string (if it is just text) to a JavaScript object.