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.
db.foo.rename('post');

Field name change

db.post.update({$rename:{url:'site'}});