Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

Latest commit

 

History

History
36 lines (29 loc) · 587 Bytes

README.md

File metadata and controls

36 lines (29 loc) · 587 Bytes

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

rename({"field_map": {"test":"renamed"}})

example

message in

{
    "_id": 0,
    "name": "transporter",
    "type": "function",
    "count": 10
}

config

rename({"field_map": {"count":"total"}})

message out

{
    "_id": 0,
    "name": "transporter",
    "type": "function",
    "total": 10
}