Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories Database
Created by Guest
Created on Feb 7, 2024

JSON

I'm converting a lot of data for export from MongoDB -> Postgresql I would like an aggregation function to convert an object to JSON { "$addField": { "_id": true, "json": { '$convert': { 'input': '$subdocument', 'to': 'json', # // Idealy, +1 for msgpack https://msgpack.org/ } } } } thus object.json would be a STRING "{abc: true}" FYI: Postgresql supports JSON(B) in it's field structures: https://www.postgresql.org/docs/current/datatype-json.html
  • Attach files