cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ishraqiyun77
Level: Powered On

Parsing a string to go into JSON array

Making a connection between a web app that we use and Dynamics 365. I have a field in both that allows for multiple selections in drop down list.

The problem is this.

In CRM, the fields data is stored as this:

crm.PNG

In the other Web App, the JSON needs to be formatted as such:

ml.PNG

And to complicate matters, the amount of values being passed isn't consistent: it could be zero, or it could be 10, so commas could cause an issue as well.

Not sure how to go about this. Any suggestions?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Parsing a string to go into JSON array

Hi @ishraqiyun77 ,

 

Could you provide screenshoot of Flow configuration?

You could get the value of projecttypetags field first, then use split() function to convert the field values into arrays with a comma as the split point.

 

Then use Apply to each to iterate through the array and append each element to JSON array. You might need to use Append to array variable action.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 REPLIES 2
Community Support Team
Community Support Team

Re: Parsing a string to go into JSON array

Hi @ishraqiyun77 ,

 

Could you provide screenshoot of Flow configuration?

You could get the value of projecttypetags field first, then use split() function to convert the field values into arrays with a comma as the split point.

 

Then use Apply to each to iterate through the array and append each element to JSON array. You might need to use Append to array variable action.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ishraqiyun77
Level: Powered On

Re: Parsing a string to go into JSON array

This is what I ended up doing.Capture.PNG

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 125 members 4,587 guests
Please welcome our newest community members: