title: How to increment a data field in Firestore using Firebase Modular SDK V9?
body: <p>So I'm trying to increment data for sending a num to other user's num.</p>
  <pre><code>const sendNum = async(e) =&gt; {
          e.preventDefault();
          
          
          const targetQuery = query(userCol, where(&quot;keycode&quot;, &quot;==&quot;, parseInt(target)));
          const targetSnapshot = await getDocs(targetQuery)
          
          targetSnapshot.forEach((document) =&gt; {
              console.log(document.data().num)
              console.log(document.id)
              const targetRef = doc(db, 'users', document.id)
  
              setDoc(targetRef, {
                  num: // increment user data here
              }, {merge: true})
          })
  }
  </code></pre>
  <p>But a documentation that I found, I don't really understand them.
  And the one I understand, it's already outdated.
  So I would be very happy if anyone know how :)</p>