Search code examples
firebasegoogle-cloud-firestorefirebase-console

Creating FIrestore Maps from the console


I've seen a post on how to create a Map in the Firebase console for the realtime database, but how do you create a Map (in order to create a mutable/queryable list structure) in Firebase from the console? This is in order to create dummy data without doing so from the client.


Solution

  • Firestore documents are essentially JSON, and JSON doesn't have a native map data type. The most direct mapping is to create a JSON object:

    Adding a field of type <code>object</code>

    Now you can add the keys and values under the new field.