How can I arrange the fields of the documents returned by the output of the find
query in a certain format?
Let's assume that by default, the find
query returns the fields in the following format:
{ "_id" : 2, "name" : "bob", "status" : "A" }
{ "_id" : 3, "name" : "ahn", "status" : "A" }
{ "_id" : 6, "name" : "abc", "status" : "A" }
However, I want it to return it in the following order/arrangement of the fields
{ "_id" : 2, "status" : "A", "name" : "bob" }
{ "_id" : 3, "status" : "A", "name" : "ahn" }
{ "_id" : 6, "status" : "A", "name" : "abc" }