Just as we have unset to drop a field, we also can rename it,
so if we look back into our data, let's say age is something we want to rename to total age.
Well what we could do is we could again update many,
now I will actually just use empty curly braces to select all documents in the collection and then to
rename a field, there is the rename operator. The rename operator takes a document as a value where you
then specify the field name you want to rename,
so in our case here, that is age and then as a string, the new field name, total age. If you now hit enter,
you'll see three modifications were made,
why three if we found four elements?
Well Max never had an age,
so if I now find all users, we see total age for Chris, total age for Anna, total age for Manuel and Max
never had an age field and therefore it was also not renamed,
it was never there
and as you saw, it will then also not be added because what would be the value?
We didn't specify a value, we just renamed it.
If you wanted to add an age field to Max, you would do that with set.