Mongodb aggregation pipeline to get subdocument object as string
I have a MongoDB collection containing documents like these: { "id": "62cd5de762c595905e37821b", "letterNo": "122233", "letterDate": "2023-03-01", "metaData": { "name": "test", "family ": "test" } }, { "id": "62cd5de762c595905e37821a", "letterNo": "122233", "letterDate": "2023-03-01", "metaData": { "type": "xxxx", "where": "test" } }…