How to modify the collection name and key name of mongodb

  mongodb, question

The name of the collection isfooI would like to change it topost
At the same time, willurlChange tositeSince there are many such document in the collection, I don’t know how to update them in batches. is there any way?

    '_id': ObjectId()
    'url': ''

Collection changed its name.'post');

Field name change{$rename:{url:'site'}});