This is my attempt but it returns undefined but I've figured this can't be done without having the keys as .child(keys)
or something of that nature.
var ref = new Firebase("https://users.firebaseio.com/");
ref.child("users").child(authData.uid).on("value", function(snapshot) {
var users = snapshot.val();
console.log("snap: " + snapshot.val());
console.log("username: " + users.username);
console.log("username: " + users.email);
});
Here's my firebase json text. I want to read email lastname and username through many keys not just per key.
"users": {
"6179eb29-9691-4828-be5a-28a94e84703b": {
"-KLWoGzjymD0Sgvf5Rcs": {
"email": "jaycarter@gmail.com",
"lastname": "cater",
"username": "jay"
}
},
"6a210785-0a73-4c83-b3e1-d3828f9d8a3b": {
"-KLqMiLTB71dTh7PrVpL": {
"email": "k@gmail.com",
"lastname": "john",
"username": "smith"
}
}