I have this application log that is made up of nested JSON
{
"status": "OK",
"next": null,
"data": {
"Event1": {
"Time": "2020-04-21 11:28:22",
"Username": "testuser11@test.com",
"IP_Address": "127.0.0.1",
"Action": "Log in",
"Data": "12.34.56.78"
},
"Event2": {
"Time": "2020-04-21 11:26:41",
"Username": "testuser2@test.com",
"IP_Address": "127.0.0.1",
"Action": "Log in",
"Data": "23.45.67.89"
},
"Event3": {
"Time": "2020-04-21 11:25:37",
"Username": "testuser3@test.com",
"IP_Address": "127.0.0.1",
"Action": "Log in",
"Data": "34.123.56.78"
}
}
}
I want to try to search on Username (or really any of the fields under the "Event x" key field).
My issue is that the application increments the Event number so I can't do a normal spath path=data.Event{}.Username statement.
I am not skilled enough in the ways of spath or the rename|mvzip|mvexpand|mvindex combonations to figure this out. I feel the answer is to do something like that, but that is just from reading all of the other Answers that had JSON parsing issues. Please help.
... View more