I'm just starting out with AJAX, trying to use JQuery's $.getJSON function (or any related, ie $.load(), $.ajax(), etc). I have a JSON file with a structure something like this:
[
{
"id": 1,
"email": "user@domain.com",
"password": "password"
},
{
"id": 2,
"email": "one@two.com",
"password": "password"
}
]
How can I call a GET on this JSON file (let's call it users.json) for a user with a specific email? I thought it would be the second paramter in $.getJSON, but that seems to just return the whole tree.
Thanks!