Replies: 1 comment 4 replies
-
Hi Balki, adding support for this jq's slice syntax Till then, there isn't a great way to do it - though your trick of |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Example:
Trying to take first 2 elements
This works though but not easy for large n
This works but wondering if there is a concise way i am missing.
❯ yq '.[] | select(key < 2)' ex.yaml
foo
bar
Beta Was this translation helpful? Give feedback.
All reactions