Welcome to the Treehouse Community
Looking to learn something new?
Andrei Punei14,051 Points
How do you get the values from the JSON file??
The file is named employees.json altough in the callback function nested in the each method we used employee as defining the JSON file??
Pedro Sousa18,545 Points
I'm not 100% sure if I understood your question, but here's my try.
Did you noticed the data on the employees.json is an array? (everything is inside [ ]'s ).
Therefore, we are using query's .each function which takes an array, and a callback. You can name the parameters of the callback whatever you want.
For every position on the array, jQuery will call the callback and give it the current position to the first parameter and the current value to the second one.
Hope this helps.