I want to get the data under machine and the path is like this Users then Mobile Number then Machine and i want to get the child of the machine then match that data from the localstore if both match i want to print the child of mobile number. My data structure is like this.If anyone know please help
Users{
  +911234567890{
    "Name": "XYZ"
    "EmailId": "xyz@gmail.com"
    "Address": "abc"
    Machine{
      7D8721210004
      7D8721210005  //I Want to go here to match this with my localstore data. and                
                    // Print the details undert this(+911234567890) number.
    }
  }
}
and this is how i try.
var db = app.database();
var serial = localStorage.getItem('machineid')
db.ref("/Users/").child("/").child("Machines").child(serial).on("value", (snapshot)=>{
  console.log(snapshot.val())
})
 
    