title: How to get fields in a firestore document?
body: <p>I am working on some Cloud functions that works with Firestore. I am trying to get a list of fields of a specific document. For example, I have a document reference from the <code>even.data.ref</code>, but I am not sure if the document contains the field I am looking at. I want to get a list of the fields' name, but I am not sure how to do it. 
  I was trying to use <code>Object.keys()</code> method to get a list of keys of the data, but I only get a list of number (0, 1...), instead of name of fields.<br>
  I tried to use the <code>documentSnapShot.contains()</code> method, but it seems doesn't work.</p>
  
  <pre><code>exports.tryHasChild=functions.firestore.document('cities/{newCityId}')
  .onWrite((event) =&gt;{
    if (event.data.exists) {
      let myRef = event.data.ref;
      myRef.get().then(docSnapShot =&gt; {
        if (docSnapShot.contains('population')) {
          console.log("The edited document has a field of population");
        }
      });
  </code></pre>