Change "field: value" position

Hello everyone, how are you?

I am starting my studies in MongoDB and at first I really like to practice CRUD operations interacting via shell.

I would like to know if it is possible to change the position of a simple “field: value” in a given collection, as shown below:

db.movies.find({"_id": ObjectId("5ed07711b61249708c74f684")}).pretty()...

    {
        "_id" : ObjectId("5ed07711b61249708c74f684"),
        "item" : "movie",
        "year" : 2013,
        "cats" : "Donni Yen",
        "trilogy" : true,
        **"title" : "Yip Man"**
    }

I wanted to move “title”: “Yip Man” to position 2:

    {
        "_id" : ObjectId("5ed07711b61249708c74f684"),
        "item" : "movie",
        **"title" : "Yip Man"**,
        "year" : 2013,
        "cats" : "Donni Yen",
        "trilogy" : true
    }

I’ve been researching a lot but I couldn’t find this specific issue.

Thank you very much if you can help me.

Hello,and welcome : )

The order of the fields are in general the order they had in the inserted document,
with some exceptions. See the link

Because its a Document order is not really important,if you want to print it somewhere,
you can print the title as 3rd ,no matter what is the original position.

For times that position is important,arrays are more safe way to go.