node.js+mongoose - Is single rest endpoint enough to update a document with nested arrays? -


i'm developing rest api using node.js + mongoose. have model has few nested arrays within it. have put endpoint update document. add object sub-array, need separate endpoint or there way use same put endpoint? `

companyname: string, city: string, pincode: number, managers: [{     name: string,     dob: date,     gender: string,              highesteducation: string,     email: string,     phonenumbers: [{phonenumber: number}], }],` 

i have endpoint ../api/customer updating document. replaces existing document json im supplying. so, if want add manager (not replace existing manager), need seperate endpoint this? optimized solution?


Comments

Popular posts from this blog

c - Calling a function within a loop -

vb.net - Unbound DataGridView add row with checkbox error -

How i fill combobox items in Radgridview manually using in vb.net -