Option to remove comments "/* 3 */" from the results pane

Cézar Augusto shared this question 4 months ago
Answered

Hello,


I've been using noSQLBooster for quite some time and is a very good program, my copliments.


I'd like to make a simple suggestion:


When when we run some command we get the documents result on this result pane. And if we are using JSON view but not export format, it gives us these comments showing each document index in the "results list":


EG:

/* 2 */

{

},


/* 3 */

{

},

/* 4 */

{

}


In these cases I think it would be nice to be able to remove these comments, some times one would want to copy and paste these results into a table generator or something alike, something that accepts a JSON input. And these comments don't allow a proper parsing of the JSON, and have to be manually removed.


My real life problem:

I need to run aggregations in some collections and get the result in such format.

Then I would like to paste them in this site http://convertjson.com/json-to-html-table.htm to generate a fine table for my clients. However these comments make it a tough job as I have to delete every single one of them.


PS: Also, you may consider showing an actual JSON array in the results pane. As far as I know, if we don't use the JSON export formatting we get commas between documents but no opening/closing brackets :(. And if we DO use pure JSON format, we get a document on each line but no commas or brackets...

Comments (2)

photo
1

I found another way to do this.


By using js in the shell:

var result = db.COLLECTION.find({}).limit(100) 
printjson(result.toArray())

photo
1

Please try the JSON View Format -> MongoExport Pure JSON Format.

/65960f36bb721c744b3a5f538f8cffaf