here is what I am trying to do:
There is an array k, stored under 'posts' index under the below document:
k=['a','b',c'] firebase.firestore().collection('posts').doc(uid)
Merge the below array to the existing array:
k=['c','d'] result=['a','b','c','d','e']
Is there a built-in syntax to do this in Firestore? I tried arrayUnion() method, like below, but it seems that it can insert a single element, not an actual array:
firebase.firestore().collection('posts').doc(uid).update({
posts: firebase.firestore.FieldValue.arrayUnion(k)
})
Any idea on how to do this? Thanks a lot in advance!