3

I need to add / change / delete objects inside an array that is inside a document, I would like to know if I have to update all the data that will be sent, or if I can only change the specific object that is inside the array.

I have a form with many fields, I would just like to update a specific object ... Do I have to send the entire object or can I only update the specific object?

enter image description here

Is it possible to add / change / delete only objects that are within plans? Or do I need to send every object in the image to update plans together?

Luiz Ricardo Cardoso
  • 1,554
  • 4
  • 16
  • 37

1 Answers1

1

You can't update individual items in an array. You have to send the entire array with each update.

On that note, sometimes it's better to use an object if you just want to change individual elements if you already know their names.

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441