https://tines.com/ logo
#community-help
Title
# community-help
r

red-caravan-3691

06/03/2022, 10:10 PM
Hey all! Has anyone pulled Sumo Logic User lists and used Event Transformations to Explode the content? Getting:
Value at <X> is not an array or does not exist
As the return output is a huge list which is sub-divided into Arrays containing JSON, kinda like:
Copy code
{
"get_a_list_of_users_in_sumo_logic":
{
"body":
{
"data":
[

{
"firstName":"X",
"lastName":"X",
"email":"X",
"roleIds":
[
],
"createdAt":"X",
"createdBy":"X",
"modifiedAt":"X",
"modifiedBy":"X",
"id":"X",
"isActive":true,
"isLocked":false,
"isMfaEnabled":false,
"lastLoginTimestamp":"X"
},
Followed by the next user etc.. Im not sure if I am using Explode correctly here
m

modern-farmer-99434

06/03/2022, 10:19 PM
Hmm! This is working for me:
Copy code
{
  "agents": [
    {
      "disabled": false,
      "name": "get a list of users in sumo logic",
      "options": "{\"mode\":\"message_only\",\"loop\":false,\"payload\":{\"body\":{\"data\":[{\"firstName\":\"X\",\"lastName\":\"X\",\"email\":\"X\",\"roleIds\":[],\"createdAt\":\"X\",\"createdBy\":\"X\",\"modifiedAt\":\"X\",\"modifiedBy\":\"X\",\"id\":\"X\",\"isActive\":true,\"isLocked\":false,\"isMfaEnabled\":false,\"lastLoginTimestamp\":\"X\"},{\"firstName\":\"X\",\"lastName\":\"X\",\"email\":\"X\",\"roleIds\":[],\"createdAt\":\"X\",\"createdBy\":\"X\",\"modifiedAt\":\"X\",\"modifiedBy\":\"X\",\"id\":\"X\",\"isActive\":true,\"isLocked\":false,\"isMfaEnabled\":false,\"lastLoginTimestamp\":\"X\"},{\"firstName\":\"X\",\"lastName\":\"X\",\"email\":\"X\",\"roleIds\":[],\"createdAt\":\"X\",\"createdBy\":\"X\",\"modifiedAt\":\"X\",\"modifiedBy\":\"X\",\"id\":\"X\",\"isActive\":true,\"isLocked\":false,\"isMfaEnabled\":false,\"lastLoginTimestamp\":\"X\"}]}}}",
      "position": {
        "x": 60,
        "y": 195
      },
      "type": "eventTransformation"
    },
    {
      "disabled": false,
      "name": "Explode",
      "options": "{\"mode\":\"explode\",\"path\":\"{{get_a_list_of_users_in_sumo_logic.body.data}}\",\"to\":\"individual_item\"}",
      "position": {
        "x": 60,
        "y": 345
      },
      "type": "eventTransformation"
    }
  ],
  "links": [
    {
      "sourceIdentifier": 0,
      "receiverIdentifier": 1
    }
  ],
  "diagramNotes": []
}
r

red-caravan-3691

06/03/2022, 10:20 PM
Hey Thomas! Apologies, I am being dumb but I see your Event Transform is not a HTTP request to Sumo?
m

modern-farmer-99434

06/03/2022, 10:26 PM
yeah, sorry - i just mocked up the request so that the data would look the same
I took your response and created a few more elements in an array and exploded them
r

red-caravan-3691

06/03/2022, 10:27 PM
OK sorry so how would I apply that to my story?
Ohhh sorry I see in a Payload of the HTTP request
m

modern-farmer-99434

06/03/2022, 10:32 PM
the
get a list of users in sumo logic
format should be identical
r

red-caravan-3691

06/03/2022, 10:32 PM
πŸ™‚ Thank you!
m

modern-farmer-99434

06/03/2022, 10:32 PM
you're welcome πŸ™‚
r

red-caravan-3691

06/03/2022, 10:32 PM
βœ‹ 5️⃣
2 Views