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 / How to convert JSON to...
Power Automate
Suggested Answer

How to convert JSON to a table in power automate

(0) ShareShare
ReportReport
Posted on by 603
I need to convert my JSON array into a table in Power Automate. May i know how to achieve this. 
 
Below is my JSON array.
 
 
I receive below table in my email which contains JSON data like {"AISRefNo:"}. I want to exclude that. Only need AIS number AIS1447. May i know how to achieve that?
 
 
I have the same question (0)
  • chiaraalina Profile Picture
    2,052 Super User 2026 Season 1 on at
    Hi
     
    That means your AISRefno field currently contains an object/stringified JSON, not the plain value.
     
    Try one of these depending on your structure:
     
     
    items('Apply_to_each_3')?['AISRefNo']
     
    or
     
     
    items('Apply_to_each_3')?['AISRefno']?['AISRefNo']
     
    Let me know if it worked!
  • Suggested answer
    11manish Profile Picture
    2,313 on at
    To convert a JSON array into a table in Microsoft Power Automate, the easiest way is to use the built-in Create HTML table action.
     
    Simple Solution (Recommended)
     
    Step 1: Ensure your JSON format
    Example input:
     
    [
      { "AISRefNo": "AIS2736", "Count": 3 },
      { "AISRefNo": "AIS0146", "Count": 2 }
    ]

    Step 2: Use Create HTML Table
    Add action:
    • Create HTML table
    • From → your JSON array (e.g., outputs('FinalArray'))
    • Columns → Choose Custom
    Map fields:
    Column    Value
    AISRefNo    item()?['AISRefNo']
    Count         item()?['Count']
     
    Step 3: Use the table
    Now you can:
    • Send in Email (Outlook action)
    • Save to SharePoint
    • Convert to PDF
     
    Thanks
    Manish
     
     
  • Suggested answer
    Haque Profile Picture
    3,217 on at
    Hi @Iantaylor2050,
     
    I am thinking you are experiencing this in the email body? Right? If this is the case, can you please stop the HTML styling for a while to check? 
     
     
    Normally, once youre "Apply to each" action is completed, the Compose action with "FinalResult"
     
     
    should prouduce this result: Which is a json array object.
    [
      {
        "RBLRefNo": "RBL2600",
        "Frequency": 6
      },
      {
        "RBLRefNo": "RBL2113",
        "Frequency": 1
      },
      {
        "RBLRefNo": "RBL1473",
        "Frequency": 2
      },
      {
        "RBLRefNo": "RBL2144",
        "Frequency": 1
      }
    ]
    NOTE: Please consider AISRefNo = RBLRefNo and Count = Frequency for your case.
    When you use Create HTML table action on FinalResult (from compose action), the below table will be produced:
     
    If all failse, use expression with Compose: Make sure you’re outputting a string, not an object.
     

    Inside the "Apply to each"  loop, build each row, use a Compose action to build TableRows with an expression like:

    concat('<tr><td>', items('Apply_to_each')?['AISRefNo'], '</td><td>', string(items('Apply_to_each')?['Count']), '</td></tr>')
    
    This creates one HTML row per item.
     
    Please note taht, you need to initialize an array varible like FinalResult at the start of your flow (at least before Apply to each loop). Let's say array variable name is TableRows, Type Array and value [].
     
    After the loop, to collect a table, use the following expression in a Compose:
    concat('<table border="1"><tr><th>AISRefNo</th><th>Count</th></tr>', join(variables('TableRows'), ''), '</table>')
    This should produce a complete html table and you can use it in the email.
     
     
     
     
  • Suggested answer
    Kalathiya Profile Picture
    2,151 Super User 2026 Season 1 on at
    Hello @Iantaylor2050
     
    Look like it's duplicate thread. 
     
    Right now you’re using items('Apply_to_each_3'), that's why it’s returning the whole JSON.

    If you only need the value, you’ll need to expand the column like this:

    Copy and past this code in formula against the AISRefNo property ..

    AISRefNo:

    items('Apply_to_each_3')?['AISRefNo']
    So, It will return just value not whole JSON object. 
     
    If this response resolves your issue, please mark it as the Verified Answer so it can help other community members as well.
    ---------------------------------------------------------------------------------

    📩 Need more help? Just mention @Kalathiya and I’ll be happy to assist.

    ✔️ If this answer helped you, please tick “Does this answer your question?” so it can be marked as the Verified Answer.

    💛 A Like always motivates me to keep contributing!

     
  • Haque Profile Picture
    3,217 on at
    Hi @Iantaylor2050,
     
    I was just following up, did you overcome the issue?
  • Kalathiya Profile Picture
    2,151 Super User 2026 Season 1 on at
     

    If this solution helped, please consider marking it as the verified answer so it can help others in the community 😊
    If you still need assistance, feel free to let us know, we’re happy to help!

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 796

#2
Valantis Profile Picture

Valantis 568

#3
Haque Profile Picture

Haque 538

Last 30 days Overall leaderboard