title: How to Add Map<String, Object> elements in firebase firestore android using Hashmap? A Store Database
body: <p>With the last improvement in matrices, you can add, update and delete an element but only in matrix.</p>
  
  <p>But for:</p>
  
  <pre><code>Map&lt;String, Object&gt; comentarios = new HashMap&lt;&gt;();
  </code></pre>
  
  <p>I probe it and it transforms me a Map to array does not matiene the same type.
  Someone know how I should do it?</p>
  
  <p>My code is:</p>
  
  <pre><code>final Map&lt;String, Object&gt; nuevoComentario = new HashMap&lt;&gt;();
  nuevoComentario.put("comentario", FieldValue.arrayUnion("id5", "Msj add"));
  db.collection("Hospedaje").document(documentGetID)
                          .update(nuevoComentario);
  </code></pre>