I am working with JSON data... which looks like this:
{"DN" : "CN=Test Group, OU=Test OU, O=\"Corp.com\"", "sourceId" : "TEST Image", "sequenceId" : 1, "description" : "doing work", "Request" : {"capability" : {"name" : "prod02", "Attributes" : [{"name" : "Model", "value" : "ea123"}, {"name" : "Verson", "value" : "1.2.3"}, {"name" : "Debug_ENABLE", "value" : "FALSE"}, {"name" : "RAM_ENABLE", "value" : "True"}, {"name" : "SW_ID", "value" : "0x0003ed"}]}}, "signatureResponse" : {"statusCode" : "1"}}
same data easier to read:
{
"DN":"CN=Test Group, OU=Test OU, O="Corp.com"",
"sourceId":"TEST Image",
"sequenceId":1,
"description":"doing work",
"Request":{
"capability":{
"name":"prod02",
"Attributes":[
{
"name":"Model",
"value":"ea123"
},
{
"name":"Version",
"value":"1.2.3"
},
{
"name":"Debug_ENABLE",
"value":"FALSE"
},
{
"name":"RAM_ENABLE",
"value":"True"
},
{
"name":"SW_ID",
"value":"0x0003ed"
}
]
}
},
"signatureResponse":{
"statusCode":"1"
}
}
When run through spath all the fields get parsed out as expected... except I want the array contents to be individual fields for the event.... right now the array fields have multiple values. So for the event in the image I want/need fields called "Model" "Verson" "RAM_Enabled" etc
Instead of just Request.capability.Attributes{}.name and Request.capability.Attributes{}.value which contain the multiple values.
... View more