hello, i have a list of objects in firebase, and i’m trying to add more objects to that list by the update record, but it replaces the current object, and doesn’t add.
Hi, try using “Create record” instead, or if your list is held in a single record, send in the entire updated list where the new object is added with
@Mari, since “create record” uses POST method this would only work if the document id within Firestore is not existent.
The only solution I see is to store the existing document ID in a variable, DELETE the document id, POST the custom ID and the updated body to Firestore.
Setup for the POST method to use custom id:
Let me know if there are better ways to solve this.
EDIT: on top of that, how can the list of objects used for “create record” that has a fixed schema?
can someone show how the list of objects can be translated dynamically in .json so that it can be used for Firestore?