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 Apps / PowerApp ParseJSON fun...
Power Apps
Unanswered

PowerApp ParseJSON function - acces JSON key with hyphen

(0) ShareShare
ReportReport
Posted on by 2

Dear all,

 

I am struggling in using ParseJSON PowerApp function to access JSON key with hyphen charachter "-" (e.g. "en-EN").

 

Let us consider this example of JSON string that is retreived via HTTP call.

Let us also consider that such JSON string is stored into jsonString variable.

 

 

{
"description":{
"en-EN":"...",
...
}
}

 

 

 

When I try to access to the JSON key "en-EN" powerapp throws to me an error in the second line.

 

 

Set(jsonObject;ParseJSON(jsonString));;
Text(jsonObject.description.en-EN);;

 

 

 

error:

"

The argument type is invalid. one of the following values is expected: Number, Text, Boolean.

The name is invalid. "EN" not recognized.

"

 

Do you know how to access to any key having an hyphene symbol as "en-EN"?

 

Thanks.

Categories:
I have the same question (0)
  • Verified answer
    JorisdG Profile Picture
    on at

    You can put the property name in single quotes for any special identifiers (for example JSON allows a property named 0 or special characters like you have).

     

    Text(jsonObject.description.'en-EN');

  • JorisdG Profile Picture
    on at

    Just as an FYI, based on this and other feedback asking this same question, I've updated the docs for parsejson, working with json, and untyped object to mention using single quotes to access fields with otherwise non-valid identifier names.

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard