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 / JSON as custom object ...
Power Automate
Answered

JSON as custom object variable indexing

(0) ShareShare
ReportReport
Posted on by 20

Hi All,

 

We have data in variable %JsonAsCustomObject% as shown below:

Alvin_Hili1_2-1635340287343.png

 

Alvin_Hili1_1-1635340160794.png

 

If we want to get the data from the firs record, we'd use %JsonAsCustomObject['1']% or if we use %JsonAsCustomObject['1']['name']% we get "root"

 

Alvin_Hili1_0-1635340142400.png

 

But we need to use variables in when indexing for data. So form the above example,where %Temp_Index% is set to 0, we'd like to be able to use %JsonAsCustomObject[Temp_Index]%, but when we try this, we get the error message "Variable 'JsonAsCustomObject' does not support indexing."

 

Thanks.

I have the same question (0)
  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Your variable needs to be of type string.

     

    Convert it from a number to text. That way you will be able to access the property with a text representation of a number.

  • Alvin_Hili1 Profile Picture
    20 on at

    Thanks, it worked.

     

    I converted the %Temp_Index% variable from number to text format, and used it to access specific data in the custom object: %JsonAsCustomObject[Temp_Index]% or %JsonAsCustomObject[Temp_Index]['totalFolders']%

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 269 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 184 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 136 Super User 2026 Season 2

Last 30 days Overall leaderboard