camden_kid
camden_kid

Reputation: 12813

How to create Firestore document with array of objects in Firebase console?

How can one create a document in Firestore using the Firebase console that is an array of objects? Such as:

myarray: [
  {hello: "world"}
]

I tried the following:

enter image description here

But this is the result:

enter image description here

Upvotes: 2

Views: 1762

Answers (2)

Doug Stevenson
Doug Stevenson

Reputation: 317372

This is formally fixed now in the Firebase console.

Upvotes: 1

Hareesh
Hareesh

Reputation: 6900

It must be a bug, i tried my self and got same result. But i found a workaround.

First create the collection and document first and click save.

then click +ADD FIELD and only add your array myarray

lastly click the + button on myarray and add your objects.

Basically do it one by one.

Upvotes: 2

Related Questions