# rename function`rename()` will update the replace existing key names with new ones based on the provided configuration. It currently only works for top level fields (i.e. `address.street` would not work).### configuration```javascriptrename({"field_map":{"test":"renamed"}})```### examplemessage in```JSON{ "_id": 0, "name": "abc", "type": "function", "count": 10}```config```javascriptrename({"field_map":{"count":"total"}})```message out```JSON{ "_id": 0, "name": "abc", "type": "function", "total": 10}```