Hi,
I need to update a collection field based on the values from another collection, For eg:
collection 1 - employee
values
{"_id":1,“name”:“aaa”, “department”:11}
{"_id":2,“name”:“bbb”, “department”:12}
collection 2 - department
{"_id":11,“name”:“dept1”}
{"_id":12,“name”:“dept2”
I need the result collection as
values
{"_id":1,“name”:“aaa”, “department”:{"_id":11,“name”:“dept1”}}
{"_id":2,“name”:“bbb”, “department”:{"_id":12,“name”:“dept2”}}
Please let me know how can I update the existing column or create new column in the collection to get the result like the above
Thanks,