Search code examples
google-cloud-firestorefirebase-console

How to create objects inside of Firebase arrays from their UI?


I do not have an option to select an object type from the Firebase UI. Check screenshot:

enter image description here

While searching stackoverflow I found this question: How to create Firestore document with array of objects in Firebase console? but he actually has the object option? I do not, how do I enable it?


Solution

  • Use the "map" option. It will let you create an object with named fields nested under it. The question you've linked to is very old, and apparently the console UI has changed in this respect.

    You can also do this in code by providing a Map (in Java) or an object (in JavaScript).