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

WordPress How to Build a WordPress Plugin Connecting WordPress Plugins with 3rd Party APIs JSON Code Challenge

Roberto Cabrera
Roberto Cabrera
1,149 Points

The json is good but still the program says it is wrong. Can you help? I need to move forward with this tutorial

I have checked the json syntax on jslint and it returned json:good.. need help!

users.json
{
  "users":{ 
      "First Name": "Mike",
    "Last Name": "The Frog"
  }
}

2 Answers

Gareth Borcherds
Gareth Borcherds
9,372 Points

Some ticky tack things, the in the frog needs to be lowercase and then you're missing the [ ] around the users array. Here is what passed.

{
  "users":[
     {
      "First Name": "Mike",
      "Last Name": "the Frog"
     }
  ]
}
Ryan Ruscett
Ryan Ruscett
23,309 Points

Hey, you are close, but you are creating a document with an array of users objects. Remember an array [] of objects {}

{                                                 // document
  "users": [                                 // Array users [
{                                                // object {
      "First Name": "Mike",             //data
    "Last Name": "The Frog"       //data
  }                                              //close object }
]                                             //close array ]
}                                           //close doc }

Let me know if that fixes your confusion.

Thanks!