title: Delete a field from Firestore, with a dynamic key
body: <p>I am trying to delete a single field from a Document in Firestore
  The Key of the field is held in a variable e.g.</p>
  
  <pre><code>var userId = "random-id-1"
  </code></pre>
  
  <p>In the document I have a field of members structured like this:</p>
  
  <pre><code>{
    members:{
      random-id-1:true,
      random-id-2:true
    }
  }
  </code></pre>
  
  <p>I would like to delete <code>random-id-1:true</code>, but keep <code>random-id-2:true</code></p>
  
  <p>How is this possible without getting the entire members object and writing an updated object?</p>
  
  <p>I have tried <a href="https://stackoverflow.com/questions/46984308/delete-field-in-firestore-document">this</a>, however I get the error: <code>Document references must have an even number of segments</code></p>
  
  <p>and I also tried this:</p>
  
  <pre><code>db.collection('groups').doc(this.props.groupId).set({
    members: {
      [userId]: firebase.firestore.FieldValue.delete()
    }
  },{merge: true})
  </code></pre>
  
  <p>However I get the error: <code>Function DocumentReference.update() called with invalid data. FieldValue.delete() can only appear at the top level of your update data</code></p>
  
  <p>Thanks for any help</p>