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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (5,354)