I'm trying to extract ip and hostname from a nested json. There are multiple ips and hostnames depending on the alert category. How can we extract and assign all the IPs and hostnames it to target.ip and target.hostname?
{
"target": {
"total_count": 2,
"data": [
{
"device": [
{
"value": "10.10.10.10",
"type": "ip"
},
{
"value": "abc",
"type": "hostname"
}
],
"type": "endpoint",
},
{
"device": [
{
"value": "11.11.11.11",
"type": "ip"
},
{
"value": "z44",
"type": "hostname"
}
],
"type": "endpoint",
}
],
}
}
Parser syntax documentation doesn't have references for this type of nested json data where key value pairs are separated.