Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
hyperthesis
on Oct 2, 2023
|
parent
|
context
|
favorite
| on:
jq 1.7
For their
pick()
example:
jq -n '{"a": 1, "b": {"c": 2, "d": 3}, "e": 4} | pick(.a, .b.c, .x)
wouldn't a more jq-y syntax be:
| {a, b.c, x}
(which fails on the 'b.c' term)
wwader
on Oct 2, 2023
[–]
yeap that could be an extension of the shorthand syntax, but note that pick/1 also works with any "path expression" ex: pick(if .a then .b.c else .x end)
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: