Skip to content

jq vs JFTL Cookbook

This cookbook compares jq with JFTL through a progression of common JSON transformation problems.

Each recipe contains:

  • a self-contained jq command, including its input data;
  • the corresponding JFTL transformation, without embedded data;
  • the expected output;
  • a complete, copy/paste JFTL example.

The short JFTL snippets focus only on the transformation being demonstrated. To make the complete examples self-contained, the sample input is embedded in datasets.input, and main sets that dataset as the current data before applying the same transformation. This allows each complete example to be copied and run without a separate input file.

Calculations and general expressions use the explicit $py= prefix. Where a correct JFTL solution is not yet clear, the JFTL block is marked TBD.

Acknowledgment: The organization and examples in this section are based on the Nushell jq vs Nushell cookbook. The examples have been adapted as needed for the jq/JFTL comparison.