python - Modify the order in which properties are displayed in MongoDB -


i using pymongo insert data (title, description, phone_number ...) mongodb. however, when use mongo client view data, displays properties in strange order. specifically, phone_number property displayed first, followed title , comes description. there way can force particular order?

mongodb documents bson objects, unordered dictionaries of key-value pairs. so, can't rely on or set specific fields order. thing can operate fields display , not to, see docs on find's projection argument.

also see related questions on so:

hope helps.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -