Swap directive

The SWAP directive swaps column names of two columns.

Syntax

swap :left :right

Usage 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 :a

results in this record:

 

Created in 2020 by Google Inc.