If I have this type of object returned in javascript (as a result of $get)
[
{
"id": "1",
"username": "john"
},
{
"id": "2",
"username": "bill"
}
]
How would I search for the username "john" and if it exists return his ID
Thanks
i.e.
$.get( baseURL + "users/")
.done(function( data ) {
var usernames = data.results;
});