i have a parsed xml data that looks like this:
"ObjLdn_Value" => [
[0] "PoolType=necc, PoolId=0, PoolMember=0, Machine=XXXXXX1, UUID=ABCDABCD1",
[1] "PoolType=necc, PoolId=0, PoolMember=1, Machine=XXXXXX2, UUID=ABCDABCD2",
[2] "PoolType=necc, PoolId=0, PoolMember=2, Machine=XXXXXX3, UUID=ABCDABCD3"
],
"endTime" => [
[0] "2020-03-02T10:15:00+01:00"
],
"TypeValue" => [
[ 0] "0",
[ 1] "100.00",
[ 2] "26777.00",
[ 3] "361.00",
[ 4] "0",
[ 5] "100.00",
[ 6] "20214.00",
[ 7] "312.00",
[ 8] "0",
[ 9] "100.00",
[10] "18203.00",
[11] "15213.00"
],
"Type" => [
[0] "VS.ScdrsTranferredOverBp",
[1] "VS.swapMemUsage",
[2] "VS.MemUsedSize",
[3] "VS.MemAvailableSize"
],
the amount of entries in Type, TypeValue and ObjLdn_Value is different each event.
i want to Create an Output that Loks like this:
"ObjLdn_Value[0]" has 4 KeyValue Pairs "Type[0,1,2,3]" with the Values "TypeValue[0,1,2,3]"
"ObjLdn_Value[1]" has 4 KeyValue Pairs "Type[0,1,2,3]" with the Values "TypeValue[4,5,6,7]"
and
"ObjLdn_Value[2]" has 4 KeyValue Pairs "Type[0,1,2,3]" with the Values "TypeValue[8,9,10,11]"
but i am uterly lost. i assume i need to use some ruby code for that?
Any help would be appriciated.