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.

View solution in original post

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.

View solution in original post

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

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Coming Soon: T-shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors
Users online (5,806)