|
|
|
|
|
by aarchi
1521 days ago
|
|
In fact, jq already has `map`, which would replace the article's pattern of `[.[]|add]` with `map(add)`. It is defined as such: def map(f): [.[] | f];
Many built-in functions in jq are implemented in jq, in terms of a small set of core primitives. The implementations can be inspected in builtin.jq.https://github.com/stedolan/jq/blob/master/src/builtin.jq#L3 |
|