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 / converting json string...
Power Automate
Answered

converting json string to json array

(0) ShareShare
ReportReport
Posted on by 2

how can i format my http output from

 

[
  {
    "project""prj1",
    "projectContats""test@company.com",
    "projectMobiles""+0000000,+11111",
    "site""site1",
    "siteAddress""address 1"
 
    
  };
 
  {
    "project""prj2",
    "projectContats""test2@company.com",
    "projectMobiles""+0000000,+11111",
    "site""site1",
    "siteAddress""address 2"
 
    
  };
 
to
 
[
  {
    "project""prj1",
    "projectContats": ["test@company.com"],
    "projectMobiles": ["+0000000,+11111"],
    "site""site1",
    "siteAddress""address 1"
 
    
  };
 
  {
    "project""prj2",
    "projectContats": ["test2@company.com"],
    "projectMobiles": ["+0000000,+11111",]
    "site""site1",
    "siteAddress""address 2"
 
    
  };
]
 
using split under for each loop is not converting projectMobiles to array. 
Please say what is wrong here
 
 
Categories:
I have the same question (0)
  • jinivthakkar Profile Picture
    4,187 on at

    @JainReshma can't you just add square brackets at the start and end of string ? did you try this ?

  • Verified answer
    mahoneypat Profile Picture
    1,720 on at

    You need to replace the ";" with a comma between the two records and remove the final ";" to get valid JSON.  I put this into an Object variable and was able to then use a ParseJSON action to turn it into an array for further actions (using this same text to generate the schema from sample).

     

    [
    {
    "project": "prj1",
    "projectContats": "test@company.com",
    "projectMobiles": "+0000000,+11111",
    "site": "site1",
    "siteAddress": "address 1"


    },

    {
    "project": "prj2",
    "projectContats": "test2@company.com",
    "projectMobiles": "+0000000,+11111",
    "site": "site1",
    "siteAddress": "address 2"
    }]

     

    Regards,

    Pat

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 248 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 207 Super User 2026 Season 1

#3
Power Platform 1919 Profile Picture

Power Platform 1919 101 Super User 2026 Season 1

Last 30 days Overall leaderboard