pkoppstein

Results 169 comments of pkoppstein

See the (semi-official) language description: https://github.com/stedolan/jq/wiki/jq-Language-Description and especially the table at https://github.com/stedolan/jq/wiki/jq-Language-Description#operators-priority

@amsross - FYI, there's never been this kind of problem using jq on macOS High Sierra. Could the problem you've encountered have something to do with Catalina?

@tst2005 - Some thoughts in response to your post: 1) jq has had pow/2 since 1.5. 2) Since the (official) Cookbook has become a collection of short essays rather than...

@tst2005 - 1. I mentioned rosettacode.org because you wrote: > I want more sample in documentation for builtin and more wiki cookbook) for functions that is not built in but...

1. When property names have special characters (such as dash) in them, some care is needed. If P is a property name (such as `foo`) you can write `.["P"]`; in...

The following filter, `unwind/1`, would I believe be worth considering as a standard jq builtin. It is a close relative of `.[]` and although it is easy enough to implement...

There are at least as many approaches to querying as there are ways of specifying the paths of interest. One generic approach is to use an arbitrary JSON object as...

@itchyny - If your comment is about `def projection,` it is misdirected, as `allpaths` is applied only to the template.

@odnoletkov - Yes, but one has to be careful as `{author: {surname}, died}` is NOT the same as `{author: {surname: null}, died: null}`. To understand the issue, consider: ``` def...

@itchyny - With the above def of allpaths, haspath can be defined as: def haspath($p): first(allpaths == $p // empty) // false;