Q:

FIrebase retrieving object by name gives null result

I have a firebase database as :
contacts:{
         "123": {
                 "email": "priya@gmail.com",
                 "name": "Priya"
                 }
         "679": {
                 "email": "seema@gmail.com",
                 "name": "Seema"
                 }

         }

I want to retrieve the records of name = "Seema"
I am running the following query :
var Ref = new Firebase('https://learning-a4158.firebaseio.com/contacts');
Ref.startAt('Priya')
    .endAt('Priya')
    .once('value', function(snap) {
       console.log('accounts matching name = Priya', snap.val())
    });

However the console output is null as:

accounts matching name = Priya null

A:

You can try this :
var ref = new Firebase("https://teststack.firebaseio.com/contacts");

    ref.orderByChild('name').equalTo('Priya').once('value', show);

    function show(snap) {
      console.log(JSON.stringify(snap.val(), null, 2));
    }

