Say I have an object:
userInfo
And I want to search each node of userInfo to see if the key 'username' has a value equal to foo.
userInfo[x].username == foo
Is there a better way of doing the following?
var matchFound = false;
for (var i = 0, len = userInfo.length; i < len; i++)
matchFound = userInfo[i].username == foo;