I have an xml file, which contains fields like:
With xpath, within xml filter, I get the fields returned as below, with each element in its array:
"PhaseName" => [
[ 0] "CRITICAL",
[ 1] "TEST",
[ 2] "OTHER",
[ 3] "XYZ"
]
"PhaseState" => [
[ 0] "NA",
[ 1] "NA",
[ 2] "NA",
[ 3] "SUCCESSFUL"
]
How to format xpath, to return data corresponding to the correct field, in an array together?
Looking to achieve result such as:
{GlobalState=OK
[Phase Name=>"CRITICAL", State=>"NA"]
[Phase Name=>"TEST", State=>"NA"]
}
I can have multiple phase states, for each given output.