What is the best way to update a particular nested array object using AutoForm:


#1

Using AutoForm:-
What is the best way to update a particular nested array object:

eg schema

People Collection

_id : 'sdlamcbye82jks',
videos:[
    {_id: 'nch3434js4dwewe78', videoName:'title1'},
    {_id: 'nvkjeweudksdm7838', videoName:'title2'}
]

autoform method =“update” : does not allow me to submit the Video Id to update against, only the Person Id
autoform method = “method-update” : has the same issue as update, only Person Id and Modifier

Possible solutions would be

  1. to use autoform method “normal”, but it feels strange to use this to reach an internal endpoint, or
  2. To get the values in a client event listener and then use Meteor.Call (again - seems to me like I’m not using the power of Meteor if i do this)

I have seen several other questions on this board relating to updating a nested doc, but in this case I would like to maintain the use of AutoForm in the cleanest possible fashion.