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 / setProperty for JSON a...
Power Automate
Unanswered

setProperty for JSON array

(1) ShareShare
ReportReport
Posted on by 15

I have a SharePoint list where one of the columns is a multi-line text column containing a JSON formatted string of data. The data is flat. For example:  

 

[
 {
 "name1": "123",
 "name2": "456",
 "name3": "789"
 }
]

 

There are currently 36 name:value pairs in the real data.  The names are static now but can be changed, removed, or added down the road.

 

My flow successfully reads a different SharePoint list to determine which name to look at in the JSON data then reads and parses the data and gets the appropriate value. So it is referencing the name to look at by a Compose "variable". All great so far.

 

In the flow, I need to update a value for one of the names, again referenced by a Compose "variable", in the JSON data then update the SharePoint list JSON data. I was hoping to use setProperty, but that is for objects and I can't get an object to work because Initialize Variable must be in the top level and Set Variable in my Apply To Each won't update from a string or array.

 

At this point I'm going to have to try using string manipulation to update the original JSON string from the SharePoint list then send it back. Am I missing something?

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    on at

    Hi @MattPawlak ,

     

    I've made a test for your reference:

    My flow:

    vbofengmsft_0-1690508527725.png

    array(setProperty(variables('tampArray')[0], 'name3', 'NewValue'))

    Result:

    vbofengmsft_0-1690508440488.png

     

    Best Regards,
    Bof

     

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…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard