title: Update fields in nested objects in firestore documents?
body: <p>I have a data structure like:</p>
  
  <p><a href="https://i.stack.imgur.com/dcBKz.png" rel="noreferrer"><img src="https://i.stack.imgur.com/dcBKz.png" alt="enter image description here"></a></p>
  
  <p>I want to edit the value of "test" key in "first" object. I followed the document on <a href="https://firebase.google.com/docs/firestore/manage-data/add-data" rel="noreferrer">https://firebase.google.com/docs/firestore/manage-data/add-data</a> </p>
  
  <p>But it did not work for me.</p>
  
  <p>The nodejs code:</p>
  
  <pre><code>var setAda = dbFirestore.collection('users').doc('alovelace').update({
          first : {
              test: "12345"
              }
  });
  </code></pre>
  
  <p>The result in firestore:
  <a href="https://i.stack.imgur.com/Q2hH2.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Q2hH2.png" alt="enter image description here"></a></p>
  
  <p>The "test2" key was gone. However, I only want to update the value of "test" and keep the "test2". </p>
  
  <p>Any solution for this problem?</p>