title: Delete a field from Firebase Firestore where the field/key has a period/punctuation (".") - modular v9 JavaScript SDK
body: <p>This question is for a React Native Expo mobile App if that matters.</p>
  <p>I have a flat database object. Using the documentation as an example:</p>
  <ul>
  <li><a href="https://firebase.google.com/docs/firestore/manage-data/delete-data" rel="nofollow noreferrer">https://firebase.google.com/docs/firestore/manage-data/delete-data</a></li>
  </ul>
  <p>I have added a field/key called &quot;example.com&quot; with some arbitrary value.
  The object then looks like this:</p>
  <pre class="lang-json prettyprint-override"><code>{
  capital: &quot;words&quot;,
  location: &quot;other words&quot;,
  &quot;example.com&quot;: &quot;more words&quot;
  }
  </code></pre>
  <p>I want to delete the key &quot;example.com&quot; key from the database, and I am using pretty much the same code as in the example from the documentation.</p>
  <pre class="lang-js prettyprint-override"><code>const cityRef = doc(db, &quot;cities&quot;, &quot;BJ&quot;);
  const payload = {
      &quot;example.com&quot;: deleteField(),
  };
  await updateDoc(cityRef, payload);
  </code></pre>
  <p>This does not delete the &quot;example.com&quot; key. I understand that this attempts to delete the &quot;com&quot; key from the &quot;example&quot; object within the main database document, which is not what I want, but I do not understand how to rework this code to treat the entire string as a key.</p>
  <p>I have looked at some similar questions here on SO(links at the bottom) that came to the conclusion that they had to use <code>FieldPath</code>, but the syntax is outdated, and no longer works on the current version of Firestore(or at least I can not find the documentation for FieldPath for the version I am using, linked above).</p>
  <p>And tips on how to get this working (deleting a field with a period) would be appreciated.</p>
  <p>Link to similar problems:</p>
  <ul>
  <li><a href="https://stackoverflow.com/questions/47801910/cannot-update-delete-firestore-field-with-period-in-the-name">Cannot update/delete Firestore field with &quot;period&quot; in the name</a></li>
  <li><a href="https://stackoverflow.com/questions/64813495/cannot-delete-fields-with-period-in-key-name?noredirect=1&amp;lq=1">Cannot Delete Fields with Period in Key Name</a></li>
  </ul>