web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / how to get data from j...
Power Automate
Unanswered

how to get data from json format like {'Value': Tom}

(1) ShareShare
ReportReport
Posted on by 16
hi every one,
 
 I need some help,
 
I'm lopping the data table in for each and insert in to the customized  data table but it insert the data like {'Value': Tom}
 
the code i'm using in action:  insert row in to data table 

=[CurrentItem.'Start date', CurrentItem.'Start time',CurrentItem.'End',CurrentItem.'End date']
 
the data comes from for each like 
but storing in custom datatable like

what should i do please give some solution

thanks,
Renjeesh
I have the same question (0)
  • Suggested answer
    eetuRobo Profile Picture
    4,163 Super User 2025 Season 2 on at
    how to get data from json format like {'Value': Tom}
    In Power Fx enabled flows (atleast still in version 2.49) if you add just one value to a table that has one column it inserts it like normal:



    But if you have multiple columns it will add it like you said { 'Value': Tom } and I don't know if that can be done other way.
     




    I recommend you just create new flow with Power Fx NOT enabled. Power Fx is still in preview and some things do not work or are very difficult when compared to regular flows.

    If you really need to use Power Fx then you could create the Insert row into data table in regular flow and copy paste it from there to your Power Fx flow. I tested and it worked.


    You cannot edit the action in the Power Fx or the action breaks. I don't recommend this method though.

    Or you can create .NET c# script that converts it to normal looking data table.



    Code: 
    foreach (DataRow row in dataTable.Rows)
    {
        foreach (DataColumn column in dataTable.Columns)
        {
            // Get the cell value as a string
            string cellValue = row[column].ToString();
    
            // Check if the value is in the format "{ 'Value': some_value }"
            if (cellValue.StartsWith("{") && cellValue.Contains(":") && cellValue.EndsWith("}"))
            {
                // Extract the value inside the wrapping
                int startIndex = cellValue.IndexOf(":") + 1;
                int endIndex = cellValue.LastIndexOf("}");
                string extractedValue = cellValue.Substring(startIndex, endIndex - startIndex).Trim();
    
                // Remove any remaining quotes
                extractedValue = extractedValue.Trim('\'', '"', ' ');
    
                // Update the cell with the extracted value
                row[column] = extractedValue;
            }
        }
    }
    

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 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard