cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AthenaPM
Helper I
Helper I

Filtering an array to update an excel row + entering multiple values into one cell

Hi all,

 

I'm currently working on a flow that pulls in JSON, parses it and then attempts to populate an excel sheet. I am able to do most of the fields without any issue. However one endpoint is nested within another endpoint and I need the two pieces of data to be separate. My idea was to append to a string variable and then update the row however that just concats all of the responses from each record accumulatively and updates the row.

 

So there are two issues that I would appreciate some help on:

 

1. Accessing the nested JSON data and entering it into a column

 

2. Updating a cell in a row with multiple items (without accumulating the data)

 

JSON:

 "total"6,
    "nb_pages"1,
    "items": [
    {
        "id"9999,
        "geO": {
            "id"565,
            "name""Global"
        },
        "approaches": [],
        "Class1": [
        {
            "id"81,
            "name""A"
        },
        {
            "id"82,
            "parent": {
                "id"81,
                "name""A"
            },
            "name""B"
        },
        {
            "id"85,
            "parent": {
                "id"81,
                "name""A"
            },
            "name""C"
        },
        {
            "id"86,
            "parent": {
                "id"81,
                "name""A"
            },
            "name""D"
        },...
 
Above is an example of the JSON, the output that I want is A in a column1 of it's own and then B,C,D in a separate column2, this process needs
to be repeated for several instances, some may have a column1 but nothing for column2 - my current solution carrys the values from one
record to the next something like this:
 
AthenaPM_0-1618342581292.png

 

If anyone has an idea on how I can achieve this I'd be very grateful!

 

Current flow:

AthenaPM_1-1618342834633.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @AthenaPM,

 

Thanks for your detailed posting, I create an example Flow to approach the table you want, but it just contains Class1 and Class2 column, the Sect column you just need to reproduce the steps about Class2 in the Flow.

I export it as a zip file, you could click the link below to download it and export it into your Flows:

Screenshot 2021-04-16 152418.jpg

 

And it result will be a object array:

Screenshot 2021-04-16 152418.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-litu-msft
Community Support
Community Support

Hi @AthenaPM,

 

Could you please provide a complete JSON? I do not understand the structure of JSON, if you could provide more details about the json, it will help us assist you better.

So the final output you want is the screenshot of the Class 1 and Class 2 table?

 

Best Regards,
Community Support Team _ Lin Tu

AthenaPM
Helper I
Helper I

@v-litu-msftThank you, I've sent you a message with the details you've asked for - for some reason editing or replying to this post wasn't working!

 

v-litu-msft
Community Support
Community Support

Hi @AthenaPM,

 

Thanks for your detailed posting, I create an example Flow to approach the table you want, but it just contains Class1 and Class2 column, the Sect column you just need to reproduce the steps about Class2 in the Flow.

I export it as a zip file, you could click the link below to download it and export it into your Flows:

Screenshot 2021-04-16 152418.jpg

 

And it result will be a object array:

Screenshot 2021-04-16 152418.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (36,527)