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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Brian Patterson](https://uploads.teamtreehouse.com/production/profile-photos/3947332/micro_image2.jpg)
Brian Patterson
19,588 PointsWhere does "profileJSON" come from.
Can someone explain to me where "profileJSON" is coming from?
1 Answer
![Jason Anders](https://uploads.teamtreehouse.com/production/profile-photos/3512822/micro_Jason_s-Pic.jpg)
Jason Anders
Treehouse Moderator 145,859 PointsHey Brian,
I'm not sure if I completely understand your question. Sorry.
In the video that you have linked, Andrew is pulling the JSON data straight from the API (in this case, the API by Treehouse). Treehouse's API provides a JSON file for any student on Treehouse. You can just add .json
to the end of the URL for your profile info to see the data.
But, depending on what information you are retrieving, it could come from anywhere. Weather information would come from some weather API (e.g. The Dark Sky API). Sports stats from someone's 'sport' API.
It's also good to know that sometimes not all APIs will offer the same information publically, and some will offer it in other formats (e.g. CSV files). In short, it is the API that provides the data from their database for you to retrieve and make use of.
You can read more on JSON FILES on the MDN.
Hope that helps.
Keep Coding! :)
Brian Patterson
19,588 PointsBrian Patterson
19,588 PointsI think I understand it now. Having looked at your comment and others. Basically, we are creating a new object and assigning it to studentProfile. Then we are asking for the "end event" to be triggered. This is because we have "Body" of the API.
James Blazer
3,836 PointsJames Blazer
3,836 PointsI have the same question. The instructor says the object is coming from profileJSON but that isn't shown anywhere. So how would I know where this object is coming from or figure out the root of an object if I were to be getting an object from another site?