DEV Community

Discussion on: Update an object in nested array in MongoDB

Collapse
 
linkitsoftoffice profile image
linkitsoftoffice

how can I use pull in this? I tried modifying the query but it prompts me up with errors like, pull to a non array value further modifying it gives me, Could not find path "undefined.0.userId" in schema.

Collapse
 
rajeshroyal profile image
Rajesh Royal

@linkitsoftoffice I have updated the post.