Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Firebase query by email address" />
<script src="//cdn.firebase.com/js/client/2.0.2/firebase.js"></script>
  <meta charset="utf-8">
  <title>Firebase query by email address</title>
</head>
<body>
</body>
</html>
 
var ref = new Firebase("https://stackoverflow.firebaseio.com/27137492");
var USERS = 'https://stackoverflow.firebaseio.com/27137492/users';
var reqestEmail = "test1@test.com";
console.log(reqestEmail); // proper email here
new Firebase(USERS)
    .orderByChild('email')
    .startAt(reqestEmail)
    .endAt(reqestEmail)
    .once('value', function(snap){
         var foundUser = snap.val();
         console.log(foundUser) // output is correct
    });
var data = {
  "users" : {
    "simplelogin:001" : {
      "email" : "test1@test.com",
      "mobile" : "+15555551001"
    },
    "simplelogin:002" : {
      "email" : "test2@test.com",
      "mobile" : "+15555551001"
    },
    "simplelogin:003" : {
      "email" : "test3@test.com",
      "mobile" : "+15555551003"
    }
  }
};
//ref.set(data);
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
pufpro
0viewers