equalto query firebase angularjs giving null values -
i have database structure in firebase this:
i wan't query database through child 'organization' child 'access_points' match ssid equalto abacus , return access_point. have written code :
var ref1 = new firebase("firebaseurl/organization"); var name = ref1.child("access_points").orderbychild('ssid').equalto('abacus') .on('value', function(snap) { $scope.acc_pt = snap.val(); console.log($scope.acc_pt); });
but query not going ssid , returning null values in console. don't know how query nested nodes. can help?
var ref1 = new firebase("firebaseurl/organization");
here making reference on organization node , "access_points" not direct child of reference , direct child -kh3dxktbupqhs_bl5d-
query must :
var name = ref1.child("-kh3dxktbupqhs_bl5d-").child("access_points").orderbychild('ssid').equalto('abacus')
Comments
Post a Comment