Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-633

printjson should output JSON

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: 0.8.3
    • Component/s: CLI Module
    • Labels:
      None
    • Not Needed

      printjson does not output JSON:

      mongosh

      > printjson(db.someCollection.find().toArray())
      [

      { _id: ObjectId("6048a9947c842705e720cbff"), x: 2 }

      ]

      mongo

      > printjson(db.someCollection.find().toArray())
      [

      { "_id" : ObjectId("6048a9947c842705e720cbff"), "x" : 2 }

      ]

            Assignee:
            Unassigned Unassigned
            Reporter:
            maurizio.casimirri@mongodb.com Maurizio Casimirri
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: