2

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

3

2 Answers 2

2

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Hi, I do not have the Object type option, how did you get Object to show up in your UI? stackoverflow.com/questions/72707950/…
1

This is formally fixed now in the Firebase console.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.