Replies: 1 comment
-
Yes, you can do it like this: yq '(.root.item[].child | select(tag != "!!seq")) |= [.]' test.xml -p=x -o=j Explanation:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
I want to generate always an array of a specific xml element in json output
Version of yq: 4.273
Input XML
Command
The command you ran:
C:/oc/yq -p=x -o=j test.xml
Actual behavior
Expected behavior
Is this possible?
Beta Was this translation helpful? Give feedback.
All reactions