cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CantStopTheFlow
Frequent Visitor

Prevent escape characters when populating array from text

Manual Trigger Flow

Parameter: pstrArray

 

pstrArray = 
{ "What": "Love", "Who": "Eros"},
{ "What": "Sea", "Who": "Neptune"},
{ "What": "Slingblade","Who":"Billy Bob Thorton"}

 

Initiate an Array variable, arrArray, and populate with:

    [ trigger()?[text] ] 

(Concatenation of the square brackets with the text in-between.)

 

When ran, arrArray gets special chars added:

[
"
{ \"What\": \"Love\", \"Who\": \"Eros\"},\n
 { \"What\": \"Sea\", \"Who\": \"Neptune\"},\n
 {\"What\": \"Slingblade\",\"Who\":\"Billy Bob Thorton\"}
"
]
 
What's the proper way to parse to populate the an array variable with array-like text from a trigger parameter?
2 REPLIES 2
DamoBird365
Microsoft
Microsoft

Hi @CantStopTheFlow 

 

Using a select I think:

 

DamoBird365_0-1614969185693.png

 

I've just had the same learning experience 🙂

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien


(I didn't realize that my post stripped out the n's after the slashes "\ n" and all of the double quotes.)

 

I had started down the Select path, but because I wanted to have a various number, and naming, of columns, I cut it short.  

 

I definitely wasted far too much energy on this, so thanks for the tip.

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,050)