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 / Parse JSON output into...
Power Automate
Unanswered

Parse JSON output into a usable string

(0) ShareShare
ReportReport
Posted on by 26

Hi,

My objective is to retreive and display two fields (webLink and toRecipient:name) from a emails in a shared mailbox to be used in an HTML table. How do I get the value of toRecipients:name - just the name?

 

Thanks,

 

Terry

 

Right now this is what I get:

 

"to": [
{
"emailAddress": {
"name": "XXXXXXXXX",
"address": "XXX@XXX.com"
}
}

I'm using the graph to retreive the values and this is the schema:

{
 "type": "object",
 "properties": {
 "@@odata.context": {
 "type": "string"
 },
 "@@odata.nextLink": {
 "type": "string"
 },
 "value": {
 "type": "array",
 "items": {
 "type": "object",
 "properties": {
 "@@odata.etag": {
 "type": "string"
 },
 "id": {
 "type": "string"
 },
 "webLink": {
 "type": "string"
 },
 "toRecipients": {
 "type": "array",
 "items": {
 "type": "object",
 "properties": {
 "emailAddress": {
 "type": "object",
 "properties": {
 "name": {
 "type": "string"
 },
 "address": {
 "type": "string"
 }
 }
 }
 },
 "required": [
 "emailAddress"
 ]
 }
 }
 }
 }
 }
 }
}

graph.png.jpgselect.jpg

 

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

    Hi @Terry_McCullagh,

     

    You may take the following blog USING JSON IN MICROSOFT FLOW for a reference:

    https://sergeluca.wordpress.com/2017/11/23/using-json-in-microsoft-flow-part-1/

    I assume that you could configure the code to something like:

    Item()?['toRecipients']?['name']

     Hope it could be your reference.

     

    Best regards,

    Mabel

     

  • TerryMcCullagh Profile Picture
    26 on at

    Mabel, Thank you for the suggestion.

     

    I tried Item()?['toRecipients']?['name'] and received this error:

    ExpressionEvaluationFailed. The execution of template action 'Apply_to_each_2' failed: the result of the evaluation of 'foreach' expression '@Item()?['toRecipients']?['name']' is of type 'Null'. The result must be a valid array.

    Can you identify what I'm doing wrong?

     


    Annotation 2019-01-29 105517.jpg

    Thanks,

    Terry

  • DanielaHo Profile Picture
    241 on at

    Hello, 

    I know it's been a while since this post but I'm having the same problem. The JSON is an object and I'm trying to extract data from it, and nothing works.. curious if you or anyone has a solution. Most solutions found online are extracting from a JSON array not object.

  • ESG Profile Picture
    14 on at

    When you parse the JSON, do you do it immediately after having access to it, or are you trying to parse JSON while nested inside of something that may not really have access to the JSON data?

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