3 ms·
looks nothing like jq 1. let $stats := collection("stats") 2. for $access in $stats 3. group by $url := $access.url 4. return 5. { 6. "url": $ur
by baq 5y ago
looks nothing like jq
1. let $stats := collection("stats")
2. for $access in $stats
3. group by $url := $access.url
4. return
5. {
6. "url": $url,
7. "avg": avg($access.response_time),
8. "hits": count($access)
9. }
- keymone 5y ago> besides the syntax
- mro_name 5y agoisn't that question like "cinema besides the movies"?
- keymone 5y agono, language is not just syntax.
- chii 5y agothe user experience. jq is often a one liner, terse and expressive. This jsoniq language looks almost like a scripting language, requiring multiple lines to write an expression.
- _wolfie_ 5y agoI have multiple 30+ lines jq scripts in my current project. So "often a one liner" is true, but it is not a requirement, so I'm still not sure why use this instead.
- jbverschoor 5y ago> JSONiq borrows a large numbers of ideas from XQuery So basically grep or even sql ->xquery. No thank you!