I am trying a simple search in Firebase to return data from my Firebase data but nothing returns.
JSON STRUCTURE
{
"-JZQzhqTI6NUQMfgHwQc" : {
"Divisions" : {
"-JZLh2UYKi5IvphLtX4I" : true,
"-JZLh2Uc5HhffF1ki4H1" : true
},
"SportTypes" : {
"-JZLOh7KtM78I5wAL6Ua" : true
},
"name" : "winnipegjets",
"nickname" : "Jets",
"teamname" : "Winnipeg Jets"
}
}
My Firebase code to do a search is the following
new Firebase("https://sizzling-fire-6197.firebaseio.com/teams")
.startAt('Winnipeg Jets')
.endAt('Winnipeg Jets')
.once('value', function(snap) {
console.log('matching team is', snap.val())
});
But once the code is execute it returns null. Also is there a way to search a specific field.