Help with parsing json



When i call an api that returns a random quote in son format (a title and content), i receive the json just fine :

ajax({ url: ‘[orderby]=rand&filter[posts_per_page]=1’, type: ‘json’ },
function(data) {
console.log(( JSON.stringify( data ) ));

console.log(( JSON.stringify( data ) )); outputs : [{“ID”:1562,“title”:“Michael Bierut”,“content”:“Most of the mediocre design today comes from designers who are faithfully doing as they were taught in school: they worship at the altar of the visual.

But console.log(data.content); outputs : none.

I don’t get it and im starting to pull my hair out, please help.


had to take out the http part because i cant post links yet


The response json is wrapped in an array, with just one object. Try this:



Try this: json formatter


Try to validate and format JSON data.