Hi,
I need solution for these case, help me out.
sub-document should be converted to new document along with main existing document.
Example:
{
_id: "user_id",
first: "first name",
last: "last name",
addresses: [
{city: "New York", state: "NY", zip: "10036", address: "229 W 43rd"},
{city: "Palo Alto", state: "CA", zip: "94301", address: "100 Forest Ave"}
]
}
Output should be like these:
{_id:"user_id",first: "first name", last: "last name"}
{city: "New York", state: "NY", zip: "10036", address: "229 W 43rd"}
{city: "Palo Alto", state: "CA", zip: "94301", address: "100 Forest Ave"}
Please help me out on this.