I search to update 1 data who is in my last array, my code just add this data in firestore but I don't com in my last array.This is my database
I want to update isPay at true.
On my database futurOrder is array and need to enter in my last index of futurOrder and update isPay at true
firebase.getUserOrder().doc(userSession.uid).update({ isPay : true })
Else I have try this but with this code I add new index I don't update last index
firebase.getUserOrder().doc(userSession.uid).update({ futurOrder: firebase.addInArray().arrayUnion({ isPay: true, }) })