Swap directive
The SWAP directive swaps column names of two columns.
Syntax
swap :left :rightUsage Notes
The SWAP directive renames left to the name of right and right to the name of left. If the either of the two columns are not present, execution of the directive fails.
Example
Using this record as an example:
{
"a": 1,
"b": "sample string"
}Applying either of these directives:
swap :a :b
swap :b :aresults in this record:
{
"b": 1,
"a": "sample string"
}
Created in 2020 by Google Inc.