title: updating and existing object in firestore database?
body: <p>In the following example I am updating 2 things. The first thing is an existing array in the db, and the second thing is an existing object. The array pushing is working as it should, but the object has an issue. I mean is there an equivalent for array union to object?</p>
  <pre class="lang-js prettyprint-override"><code>   // Doc model current state before the incoming update.
     data 
     {items :[]}
     {lists : {}}
     
     
     const addObjToClientsArr = async () =&gt; {
        const docRef = doc(db, 'data', _authContext.currentUser.uid);
        const payload = selected;
        // Array
        await updateDoc(docRef, { items: arrayUnion(payload) });
        // Obeject
        const payload2 = {[context.id]: [
              { a : 1 },
            ]}
          
         updateDoc(docRef, {
          lists: {
           payload2
        });
      };
  </code></pre>