title: check if a key exist firebase Android
body: <p>I want to check if a key exist in the firebase db. so for example, I want to look for the key "upvotes" to see if it exist or not.</p>
  
  <p>Here is an exmaple, "upvotes" key does not exist in here:
  <img src="https://i.stack.imgur.com/ZnkhW.png" alt="enter image description here"></p>
  
  <p>Now I my attempt to check if the key "upvotes" is at this location:</p>
  
  <pre><code>        Map&lt;String, Object&gt; newPost = (Map&lt;String, Object&gt;) ids.next().getValue();
              if(newPost.get("upvotes").toString().equals("upvotes")){
                  disp_rate = newPost.get("upvotes").toString();
              }
              else
              {
                  disp_rate = "0";
              }
  </code></pre>
  
  <p>My attempt is wrong, so how do I check if the key "upvotes" exist at this location.</p>