Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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" }]