Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript AJAX Basics (retiring) Programming AJAX Create a JSON file

Nathan Friend
Nathan Friend
11,177 Points

I've aded a title property but the challenge won't progress. What am I missing?

[ { "song":{"title":"Mr Brightside"} } ]

songs.json
[
  {
  "song":{"title":"Mr Brightside"}
  }
]

2 Answers

Marco Boretto
Marco Boretto
29,821 Points

it was asking for an array of objects so for example :

[{"title":"a title", "artist":"an artist"}]

so the object represents a song if you want to add an other object you'd do like so:

[ {"title":"a title", "artist":"an artist"}, {"title":"an other title", "artist":"an other artist"} ]

hope it helps

Nathan Friend
Nathan Friend
11,177 Points

Thanks Marco, putting the title property in an object causes "no title property error."

[ { "song": [{"title": "Mr Brightside"}] } ]

Nathan Friend
Nathan Friend
11,177 Points

Ah OK I understand now

[{ "song": "", "title": "Mr Brightside" }]