JSOn array flow designer, for each donsen't work

Melker
Kilo Expert

Hi

I try to get my JSON array output to work in the flow designer for each step.

But it just count 0 of 0

The output is from a Powershell script and run thru the JSON parser in the action step

The JSON Object array output:

{
    "root": {
        "root_array": [
            {
                "ID": "1",
                "IDA": {
                    "CollectionID": "SMS00001",
                    "CollectionMemberCount": "270",
                    "CollectionName": "All Systems",
                    "CollectionType": "2"
                },
            {
                "ID": "12",
                "IDA": {
                    "CollectionID": "CHQ00016",
                    "CollectionMemberCount": "1",
                    "CollectionName": "TestU",
                    "CollectionType": "1"
                }
            }
}
}
}

How can i make the for each item loop to work?

 

( I'm new to ServiceNow so bare with me 🙂 )

1 ACCEPTED SOLUTION

If you click on your action in the flow execution details. Does it return the correct values like this under "runtime values"?

find_real_file.png

View solution in original post

11 REPLIES 11

Happy you got it to work 😃

//Göran
Feel free to connect:
LinkedIn
Subscribe to my YouTube Channel
or look at my Book: The Witch Doctor's Guide To ServiceNow

Melker
Kilo Expert

Hi
I just missed it when i passed the code.
Just a Typo
This is the  correct ending of the output

              }
            }
        ]
    }
}