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 / Update an item in an a...
Power Automate
Answered

Update an item in an array of objects based on look up of value in another list

(0) ShareShare
ReportReport
Posted on by 853 Super User 2026 Season 1
Hello!
 
I'm trying to update an item in an array of objects based on a look up of zone number in another list based on a specific value in the array of objects.
 
In this Array1, I want to update the Zone value with Zone number using Store Number in Array1 as the LookUpStr value in the list of Zone numbers.
 
Array1:
[
  {
    "Store Number": 141,
    "Store Name": "test name",
    "Price": 3.99,
    "Price Type": "ZONE",
    "Price Start Date": "2024-03-18T00:00:00",
    "Promotion Type": null,
    "Promotional Price": 3.99,
    "Promotion Start Date": "2024-03-18T00:00:00",
    "Promotion End Date": "2025-01-31T00:00:00",
    "Coupon Number": null,
    "Price Status": "CUR",
    "Zone": ""
  },
  {
    "Store Number": 111,
    "Store Name": "test name2",
    "Price": 3.99,
    "Price Type": "ZONE",
    "Price Start Date": "2024-03-18T00:00:00",
    "Promotion Type": null,
    "Promotional Price": 3.99,
    "Promotion Start Date": "2024-03-18T00:00:00",
    "Promotion End Date": "2025-01-31T00:00:00",
    "Coupon Number": null,
    "Price Status": "CUR",
    "Zone": ""
  },
  {
    "Store Number": 57,
    "Store Name": "test name3",
    "Price": 3.33,
    "Price Type": "ZONE",
    "Price Start Date": "2024-12-28T00:00:00",
    "Promotion Type": "S",
    "Promotional Price": 3.33,
    "Promotion Start Date": "2024-12-28T00:00:00",
    "Promotion End Date": "2025-01-31T00:00:00",
    "Coupon Number": null,
    "Price Status": "CUR",
    "Zone": ""
  },
  {
    "Store Number": 73,
    "Store Name": "test City",
    "Price": 3.99,
    "Price Type": "ZONE",
    "Price Start Date": "2024-12-28T00:00:00",
    "Promotion Type": "I",
    "Promotional Price": 3.49,
    "Promotion Start Date": "2024-12-28T00:00:00",
    "Promotion End Date": "2025-01-31T00:00:00",
    "Coupon Number": "SC22111",
    "Price Status": "CUR",
    "Zone": ""
  },
  {
    "Store Number": 124,
    "Store Name": "test Hill",
    "Price": 2.22,
    "Price Type": "ZONE",
    "Price Start Date": "2024-12-30T00:00:00",
    "Promotion Type": "T",
    "Promotional Price": 2.22,
    "Promotion Start Date": "2024-12-30T00:00:00",
    "Promotion End Date": "2025-01-31T00:00:00",
    "Coupon Number": null,
    "Price Status": "CUR",
    "Zone": ""
  }
]

Look up list array for zone number by LookUpStr:
 
[
  {
    "Zone": "1",
    "LookUpStr": "3"
  },
  {
    "Zone": "2",
    "LookUpStr": "1"
  },
  {
    "Zone": "3",
    "LookUpStr": "80"
  },
  {
    "Zone": "4",
    "LookUpStr": "45"
  },
  {
    "Zone": "5",
    "LookUpStr": "157"
  },
  {
    "Zone": "6",
    "LookUpStr": "8"
  },
  {
    "Zone": "7",
    "LookUpStr": "129"
  },
  {
    "Zone": "8",
    "LookUpStr": "7"
  },
  {
    "Zone": "9",
    "LookUpStr": "14"
  },
  {
    "Zone": "11",
    "LookUpStr": "36"
  },
  {
    "Zone": "12",
    "LookUpStr": "69"
  },
  {
    "Zone": "13",
    "LookUpStr": "76"
  },
  {
    "Zone": "14",
    "LookUpStr": "124"
  },
  {
    "Zone": "15",
    "LookUpStr": "73"
  },
  {
    "Zone": "16",
    "LookUpStr": "57"
  },
  {
    "Zone": "17",
    "LookUpStr": "127"
  },
  {
    "Zone": "18",
    "LookUpStr": "120"
  },
  {
    "Zone": "19",
    "LookUpStr": "108"
  },
  {
    "Zone": "20",
    "LookUpStr": "111"
  },
  {
    "Zone": "21",
    "LookUpStr": "141"
  },
  {
    "Zone": "22",
    "LookUpStr": "143"
  },
  {
    "Zone": "23",
    "LookUpStr": "119"
  }
]

Sample desired results: 
Because the first record in Array1 has store number 141, its Zone is 21. See zone list array above.
Because the second record has store number 111, its Zone is 20.
Because the third record has store number 57, its Zone is 16.
And so on ...
 
[
  {
    "Store Number": 141,
    "Store Name": "test name",
    "Price": 3.99,
    "Price Type": "ZONE",
    "Price Start Date": "2024-03-18T00:00:00",
    "Promotion Type": null,
    "Promotional Price": 3.99,
    "Promotion Start Date": "2024-03-18T00:00:00",
    "Promotion End Date": "2025-01-31T00:00:00",
    "Coupon Number": null,
    "Price Status": "CUR",
    "Zone": "21"
  },
  {
    "Store Number": 111,
    "Store Name": "test name2",
    "Price": 3.99,
    "Price Type": "ZONE",
    "Price Start Date": "2024-03-18T00:00:00",
    "Promotion Type": null,
    "Promotional Price": 3.99,
    "Promotion Start Date": "2024-03-18T00:00:00",
    "Promotion End Date": "2025-01-31T00:00:00",
    "Coupon Number": null,
    "Price Status": "CUR",
    "Zone": "20"
  },
  {
    "Store Number": 57,
    "Store Name": "test name3",
    "Price": 3.33,
    "Price Type": "ZONE",
    "Price Start Date": "2024-12-28T00:00:00",
    "Promotion Type": "S",
    "Promotional Price": 3.33,
    "Promotion Start Date": "2024-12-28T00:00:00",
    "Promotion End Date": "2025-01-31T00:00:00",
    "Coupon Number": null,
    "Price Status": "CUR",
    "Zone": "16"
  },

Thanks for any suggestions!
Categories:
I have the same question (0)
  • Verified answer
    Cgangweg01 Profile Picture
    853 Super User 2026 Season 1 on at
     
    I found this excellent article by you!
     
    I used this article to answer this post. I did have to remove spaces from the field names to get the Select action to work and even though it works, it shows this odd question mark.
     
    Starting to understand xpath but not 100%. 
    Is there a good reference to learn this?
     
    If you reply to this post, I will mark it answered by you, so you get the credit.
     
    Thanks again!

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!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 286

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard