Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Delighted to see work continue on jq, which I use for altogether way too many things.
I ask this as a fan of both the project and the new pick() feature: are there any other functions in jq whose interpretation of their arguments is "non-regular" in the sense the PR author means [here][1]?
More concretely, the expression `.a, .b.c, .x` means something very different outside a pick call. It represents a uncollected stream of more than one value, rather than a reduction of an object into a subset of itself.
The syntax inside a pick call is (I believe) impossible to implement in jq; it has to be a builtin. There's no way to get "regular jq" to extract the path expressions as strings with which to set an object's keys.
Ultimately I do think like the addition, but I recognize the tradeoff of "pure" consistency for syntactical brevity. I'd be curious to hear from the maintainers A) whether I'm off-base about the pathexp syntax limitation and B) if there's some philosophy or design principle guiding why and when they might decide to add specialized interpretations of pathexps.
[1]: https://github.com/jqlang/jq/pull/2656#issuecomment-16228220...
Some competition for https://github.com/itchyny/gojq. I had read somewhere that it was faster than jq - no idea if that's still the case.