You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow parent to take an optional number argument , to return the nth parent, so . | parent(2) would be the same as . | parent | parent
Describe the solution you'd like
If we have data1.yml like:
(please keep to around 10 lines )
a:
b:
c: 1
And we run a command:
yq '.a.b.c | parent(2)'
it could output
b:
c: 1
Describe alternatives you've considered
parent(2) should work just the same as parent | parent, similarly parent(n) would be the same as parent | parent | ... | parent, just much more concise and clean than the latter.
The text was updated successfully, but these errors were encountered:
Please describe your feature request.
Allow parent to take an optional number argument , to return the nth parent, so
. | parent(2)
would be the same as. | parent | parent
Describe the solution you'd like
If we have data1.yml like:
(please keep to around 10 lines )
And we run a command:
yq '.a.b.c | parent(2)'
it could output
Describe alternatives you've considered
parent(2)
should work just the same asparent | parent
, similarlyparent(n)
would be the same asparent | parent | ... | parent
, just much more concise and clean than the latter.The text was updated successfully, but these errors were encountered: