ArangoDB Shell Output
By default, the ArangoDB shell uses a pretty printer when JSON documents are printed. This ensures documents are printed in a human-readable way:
arangosh> db._create("five")
[ArangoCollection 34208, "five" (type document, status loaded)]
arangosh> for (i = 0; i < 5; i++) db.five.save({value:i})
arangosh> db.five.toArray()
[
{
"_key" : "34224",
"_id" : "five/34224",
"_rev" : "_VTxTdI6--A",
"value" : 4
},
{
"_key" : "34218",
"_id" : "five/34218",
"_rev" : "_VTxTdI6---",
"value" : 2
},
{
"_key" : "34221",
"_id" : "five/34221",
"_rev" : "_VTxTdI6--_",
"value" : 3
},
{
"_key" : "34211",
"_id" : "five/34211",
"_rev" : "_VTxTdI2---",
"value" : 0
},
{
"_key" : "34215",
"_id" : "five/34215",
"_rev" : "_VTxTdI2--_",
"value" : 1
}
]
arangosh> db._create("five")
arangosh> for (i = 0; i < 5; i++) db.five.save({value:i})
arangosh> db.five.toArray()
While the pretty-printer produces nice looking results, it will need a lot of screen space for each document. Sometimes, a more dense output might be better. In this case, the pretty printer can be turned off using the command stop_pretty_print().
To turn on pretty printing again, use the start_pretty_print() command.