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 trialNathan Friend
11,177 PointsI've aded a title property but the challenge won't progress. What am I missing?
[ { "song":{"title":"Mr Brightside"} } ]
[
{
"song":{"title":"Mr Brightside"}
}
]
2 Answers
Marco Boretto
29,821 Pointsit 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
11,177 PointsAh OK I understand now
[{ "song": "", "title": "Mr Brightside" }]
Nathan Friend
11,177 PointsNathan Friend
11,177 PointsThanks Marco, putting the title property in an object causes "no title property error."
[ { "song": [{"title": "Mr Brightside"}] } ]