Assuming I have this structure in the database
userId : {
Messages : {
SenderID : {
PushID: {
"msg": "Mensagem"
}
}
}
I'm using this code to "read" everything inside the "userID"
dbRef.child(user.uid + "/Messages").on("value", function(snap){
obj.html(JSON.stringify(snap.val(), null, 3));
});
but the return I need is just the "msg": "message"
I would like to know how to return only what I need, can anyone help me? thanks from ja