title: how to retrieve particular data from firebase database for web
body: <p>I created a database for footballers, I would like to retrieve the data and display it in a table, but I would like to be able to retrieve say defenders separately, strikers separately....not all the player data at once</p>
  
  <p>this is how I am currently retrieving and displaying the data</p>
  
  <pre><code>var rootRef = firebase.database().ref("imageurl");
  rootRef.on("child_added", snap =&gt; {
    var pic = snap.child("url").val();
    var name = snap.child("name").val();
    var nationality = snap.child("nationality").val();
    var birthday = snap.child("dob").val();
    var height = snap.child("height").val();
    var position = snap.child("category").val();
    var foot= snap.child("foot").val();
    var weight = snap.child("weight").val();
    var transfer = snap.child("transferLink").val();
    var youtube = snap.child("youtubeLink").val();
  
    $("#tbl_body").append("&lt;tr&gt;&lt;td&gt;" + "&lt;img class=footbl src=" + pic + "&gt;" + "&lt;/td&gt;&lt;td&gt;" + name + "&lt;/td&gt;&lt;td&gt;" + nationality + "&lt;/td&gt;&lt;td&gt;" + birthday +  "&lt;/td&gt;&lt;td&gt;" + height +
     "&lt;/td&gt;&lt;td&gt;" + position +  "&lt;/td&gt;&lt;td&gt;" + foot +  "&lt;/td&gt;&lt;td&gt;" + weight +  "&lt;/td&gt;&lt;td&gt;" + transfer +
      "&lt;/td&gt;&lt;td&gt;" + youtube + "&lt;/td&gt;&lt;/tr&gt;");
  });
  </code></pre>
  
  <p>but this option lists all the database entries... I would like to be able to retrieve, say only the defenders for example.</p>