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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Automate
Unanswered

Append to Array

(0) ShareShare
ReportReport
Posted on by

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,781 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
    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,781 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
    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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard