Without knowing the phone identifier and given the current database structure, this will not be possible.
/phones.
{
users:
userId:
phones:
0123456789: true
}
:
ref.orderByChild("phones/"+phoneNumber).equalTo(true).once("value", function(snapshot) {
console.log(snapshot.val());
});
jsFiddle.
, phoneId.
ref.orderByChild("phones/phone1").equalTo("0123456789").once("value", function(snapshot) {
console.log(snapshot.val());
});
, , noSQL.
noSQL , . . , , phoneNumber , /phones/phoneNumber/, , , .