Rename a Key
Renames a key within a record.
Example
This example shows how to use the RenameKey transformation to rename a key in a record.
{
"operation": "rename_key",
"arguments": {
"key": "old_key",
"new_key": "new_key"
}
}
Given the input record:
{
"old_key": "value",
"another_field": "another_value"
}
The output record will be:
{
"new_key": "value",
"another_field": "another_value"
}
If the key does not exist:
Given the input record:
{
"another_field": "another_value"
}
The output record will be unchanged:
{
"another_field": "another_value"
}