<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z00008jRjdSCASOkta Identity EngineWorkflowsAnswered2024-09-01T09:04:22.000Z2023-01-30T18:07:46.000Z2023-01-31T17:43:35.000Z

ManuelD.06876 (Customer) asked a question.

How to use a helper flow to loop through a JSON object?

Spent the entire afternoon trying to figure this one out. I have tried everything. The helper workflow is not receiving a single employee record but rather the entire json object.

This is the JSON structure:

 

{

"timestamp": "2023-01-30T16:38:57.8426642Z",

"count": 21,

"data": [

{

"id": 492,

"externalId": "000948",

"userName": "000948",

"guid": "806f2a15-2bf2-4892-89f1-0cfd3f8c8d3e",

"firstName": "Jim",

"lastName": "Larson",

"primaryEmail": "jim.larson@gmail.com",

},

{

"id": 602,

"externalId": "000818",

"userName": "000818",

"guid": "a07ec8a2-ed95-4c5b-9c16-7af9bf5bed96",


  • q5nrb (q5nrb)

    Oh, been there, done that so many times. What you are looking at is a JSON object which includes a list of objects. The [obj1, obj2, obj3] is the telltale. You need to extract that list from the main object and run List - For Each

    Image is not available
    Parent flow:

    Image is not available
    Helper flow:

    Image is not available
    Sample output:

    Image is not available
    hope that helps.

    Expand Post
  • TimL.58332 (Workflows)

    If you look at Mads example there are three things:

     

    1) You utilized an Object Foreach and not a List Foreach. "data" is a "list of objects"

    2) The Object - Get allows you to pull an object path out. "data" was the target so the list(array) of objects is isolated and can later be parsed.

    3) On the foreach card there is a little (down arrow) icon. Once you drag the list(array) to be iterated over you need to click that Icon and select the content you want to pass.

    Expand Post
This question is closed.
Loading
How to use a helper flow to loop through a JSON object?