question on xml fusion
fredmo opened this issue · 1 comments
fredmo commented
Problem Statement
I have an xml with mutliple time the same name "service" .
Expected Result
I would like to group on all the service having the same in a unique "service name"
Currently I found this command,
xq -x '.[].service |= unique_by(."@name")' my_xml.xml
But it s removing the seconde occurrence having the same service name.
Would you have the advice to fusion on the "service with the same name" ?
Regards
fredmo commented
I found a workaround with a python script.