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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Map Parse Json output ...
Power Automate
Unanswered

Map Parse Json output to an array dictionary

(1) ShareShare
ReportReport
Posted on 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?

Categories:
I have the same question (0)
  • automateoctopus Profile Picture
    12 on at

    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. 

  • Damin Profile Picture
    63 on at

    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.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 339 Super User 2025 Season 2

#1
trice602 Profile Picture

trice602 339 Super User 2025 Season 2

#3
David_MA Profile Picture

David_MA 270 Super User 2025 Season 2

Last 30 days Overall leaderboard