How can I get the id when I just saved a nested collection?
Code:
(Topic = schemaname from mongoose)
Topic.findByIdAndUpdate({_id: data.topicId}, {data that im inserting in the nested collection})
The topic is updated and a nested collection is added, also with an id. Is there a way to return the id of the inserted nested collection?