Transferring content of one collection into a document in a different collection

You can use the dot notation:

  {
    "$addFields": {
      "overall_status": "IN-PROGRESS",
      "auditor": "Jane Doe",
      "audit_notes.parts.result": "FAILED"
    }
  },

The aggregation framework is an awesome tool to slice and dice data, update it or all kinds of things!

If you’ve not done so already, check out the MongoDB university courses, i.e.

1 Like