web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : T4N5pUiYR2HQbSyHtQe3uo
Power Automate - General Discussion
Unanswered

Map Parse Json output to an array dictionary

Like (1) ShareShare
ReportReport
Posted on 4 Jul 2024 10:01:31 by 12

First post here, so please ask extra explanation is needed.

 

I have a flow which sends a http request to sharepoint to return some meta data on a document library (focus on ComplianceTag (which shows which retention label is applied)) 

 

Following the Parse JSON, I'm able to correctly compose what the retention label is. The next step, is that I want to populate a new column named 'Retention Period', where I have mapped each retention label to a period. 

 

For example:

Retention Label: "Meetings (Team/Service)",
Retention Period: "6 years after date created"

 

I've initialized a variable called RetentionLabelMappings, which has this setup:

[
{
"label": "Guides & Templates",
"value": "Date Superseded"
},
{
"label": "Meetings (Team/Service)",
"value": "6 years after date created"
},
{
"label": "Meetings (Working Groups)",
"value": "10 years after date created"
}

]

 

How do I successfully retrieve the retention label/compliance tag and then map the label to the period? 

 

I've tried a filter array but I don't seem to get it working. 

 

automateoctopus_0-1720087194308.png

This is the current flow, with the hope that after the final compose, I can store the retention label in a variable and use the Update file action in Sharepoint to update the column value. 

 

Any ideas?

  • Damin Profile Picture
    63 on 04 Jul 2024 at 18:41:04
    Re: Map Parse Json output to an array dictionary

    In applyToEach Action, since the input is the initialized variable which is your array, inside the loop when you try to display item()?['label'] or item()?['value'], this will return the current value for the key in this current item.
    I hope I've good explained, maybe.

  • automateoctopus Profile Picture
    12 on 04 Jul 2024 at 13:55:16
    Re: Map Parse Json output to an array dictionary

    TLDR: I've got some meta data from a document library (what the value of a files retention label is set to), and want to update a 'Retention Period' column based on the retention label value. I.e if the retention label column value is set to Internal Projects, the Retention Period will be set to 6 years.

     

    The flow currently successfully returns the retention label value for each file, but I'm having trouble mapping the label to the retention period that I set in an array variable. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete