JSON getting sub-object quesation

Hey team, New here at n8n, loving the solution and its features.

I got a question regarding getting a sub-object inside json.
I am using Lastpass (yeah I know) and would want to pull the audit log via API and then forward to my SIEM.

getting the response from API is easy but then I am unable to extract the “Events” themselves from the object and one by one forward to my SIEM.

Json response body looks like:

{
    "status": "OK",
    "next": null,
    "data": {
        "Event1": {
            "Time": "2015-07-17 09:51:51",
            "Username": "[email protected]",
            "IP_Address": "10.16.21.21",
            "Action": "Failed Login Attempt",
            "Data": ""
        },
        "Event2": {
            "Time": "2015-07-17 09:51:56",
            "Username": "[email protected]",
            "IP_Address": "10.16.21.21",
            "Action": "Failed Login Attempt",
            "Data": ""
        }
    }
}

I need to get the json object “event*” at {“data”: { Event*": { event_it_self }}} and some how forward them one by one to my HTTP connector to SIEM.

( little to no knowledge of Javascript here btw)
Thanks for the assistance.

Hey @Skrymor,

It looks like you will probably need to use a code node and a bit of javascript to get what you are after on this one, It isn’t pretty but the below is a starting point you can use.

Hey Jon,

I was able to create something almost as the one you provided.
I will set this as an answer as seems to me almost the same.

thanks

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.