News for hackers. Stuff that matters.
Re:JSONiq: JSON Query Language by bonzini on Tuesday November 09, 2021 @09:27AM (#29162148)
jq seems to have more focus on the generator and pipe abstractions. In jq you say "foo | map(bar)"; foo and map(bar) are both generators, and bar refers to each element of foo as ".". Here you say "for $x in foo return bar"; foo and bar are both JSON objects, and bar refers to each element of foo as "$x", so the iteration is more explicit.

Likewise, compare "sum($element.response_time)" with "map(.response_time) | add" in jq. Processing in JSONiq goes inside to outside while jq goes left to right.

There are no comments on this comment yet.