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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Change value of array ...
Power Automate
Unanswered

Change value of array based on another array.

(0) ShareShare
ReportReport
Posted on by 578

I have an array called "Crops" that contains, among other values, the US State Abbreviations. The array looks like this:

[
 {
 "Crop": "Asparagus",
 "Planted_Acres": 0.02,
 "State_Abbrv": "AK",
 "State":"XX"
 },
 {
 "Crop": "Barley",
 "Planted_Acres": 4973.51,
 "State_Abbrv": "AK",
 "State":"XX"
 },
 {
 "Crop": "Beans",
 "Planted_Acres": 0.11,
 "State_Abbrv": "AK",
 "State":"XX"
 },
 {
 "Crop": "Beets",
 "Planted_Acres": 0.06,
 "State_Abbrv": "AK",
 "State":"XX"
 },
 {
 "Crop": "Broccoli",
 "Planted_Acres": 0.04,
 "State_Abbrv": "AK",
 "State":"XX"
 },
...

 

I have another array called "StatesAbbreviations" that looks like this:

[
 {
 "name": "Alabama",
 "abbreviation": "AL"
 },
 {
 "name": "Alaska",
 "abbreviation": "AK"
 },
...

How can I loop through the Crops array, and change the values of "State" to the StatesAbbreviations name so it would look like this?

 

[
 {
 "Crop": "Asparagus",
 "Planted_Acres": 0.02,
 "State_Abbrv": "AK",
 "State":"Arkansa"
 },
 {
 "Crop": "Barley",
 "Planted_Acres": 4973.51,
 "State_Abbrv": "AK",
 "State":"Arkansa"
 },

Any help would be appreciated. Thanks in advance.

Categories:
I have the same question (0)
  • devtollon Profile Picture
    24 on at

    I think that the simplest way to do that would be with the Select. This will let you shape your data, also by letting you change the name of the keys.

     

    I leave you a reference down here:

    https://learn.microsoft.com/en-us/power-automate/data-operations

     

    Let me know if this solved your issue!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 608

#2
Valantis Profile Picture

Valantis 416

#3
11manish Profile Picture

11manish 348

Last 30 days Overall leaderboard