web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Answered

Append to Array

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi

I am trying to add a string to an array.  And it works however the result is not what I was hoping for. 

 

So the string is:

{"Title": "Edward"}

and the array is:

[ {"Title": "Lyn"},{"Title": "Andy"}, {"Title": "James"}, {"Title": "Paul"}

 

the result:

[
  {
"Title": "Lyn"
  },
  {
    "Title": "Andy"
  },
  {
    "Title": "James"
  },
  {
    "Title": "Paul"
  },
  "{\"Title\": \"Edward\"}"
]
 
How can I add it so that it doesn't add in the extra double quotes and the back slashes?
 
Thanks
Dan
Categories:
I have the same question (0)
  • Verified answer
    Jcook Profile Picture
    7,783 Most Valuable Professional on at
    Hello,

    This blog goes deep into getting rid of special characters from an output.

    Here is the link to the blog post:
    https://www.alanps1.io/power-platform/flow/flow-stripping-unwanted-characters-or-special-characters-from-a-string/

    --Josh

    If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi

    So are you saying, add it as I've done and then remove the additional quotes and backslashes that are not required?  I was thinking I am not appending the string correctly - because its adding the string to the end of the array but what I want is to add the string as an item of the array?

     

    Thanks

    Dan

  • Jcook Profile Picture
    7,783 Most Valuable Professional on at
    Could you post a picture of your flow.
    Thanks

    --Josh

    If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    This website wont let me add a screenshot keeps telling me invalid html was found.

     

    Basically I have 4 steps.

    1 - initialise a string variable (aUser) and its value is {"Title": "Edward"}

    2 - initialise an array variable (someUsers) and its value is 

    [ {"Title": "Lyn"},{"Title": "Andy"}, {"Title": "James"}, {"Title": "Paul"}

    3 - Append to array variable - where name is someUsers and value is aUser

    4 - Compose someUsers

     

    I guess it works it in the sense that it does append the string to the array, but that's not what I want, I want to add the string as a new item/element to the array?  I hope that makes sense!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi

    I managed to work around what I was trying to do.  I dont really need the Title part within the array I was trying to use so I used your advice to strip away the multiple instances of Title and left myself with an array that looks like [Lyn, Andy, James, Paul] and now I can add items into it!

     

    cheers

    Dan 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 801

#2
Valantis Profile Picture

Valantis 602

#3
Haque Profile Picture

Haque 581

Last 30 days Overall leaderboard