0

i want to change taken value to true on specific index of notification time stamp (array in fire base ,shown in image)so how i write my query [1]: https://i.stack.imgur.com/aGWpI.jpg

my code:-

await FirebaseFirestore.instance
    .collection('Prescriptions')
    .doc(medicineDetails['id'].toString())
    .update({
        'NotificationTimeStamp ': FieldValue.arrayUnion([{}])
    });
Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441

1 Answers1

0

you can only add or remove from an array, but as a work around you can do this by changing the array in code the replacing the array in firebase.

M.M.Hasibuzzaman
  • 1,015
  • 5
  • 10