cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JimmyWork
Memorable Member
Memorable Member

Append character to each item in an array

Hi

 

If I have an array like this.

[
 "Somestring 1",
 "Something else 2",
 "Another string"
]

 

Can I in someway add a character in the beginning of each item in the array so it would look like this.
Adding character "["

[
 "[Somestring 1",
 "[Something else 2",
 "[Another string"
]
2 ACCEPTED SOLUTIONS

Accepted Solutions
Expiscornovus
Dual Super User
Dual Super User

Hi @JimmyWork,

 

You could loop through each item of the array, add the [ character to a single item and append it to a Temp array. After the loop you can either use that Temp array value or update the original array.

 

Below is an example of such an approach.

 

"[@{item()}"

 

appendtoarray.png

View solution in original post

Paulie78
Super User
Super User

Here is another method which is faster and less complicated:

Concat Array.png

 

Blog: tachytelic.net

YouTube: https://www.youtube.com/c/PaulieM/videos

If I answered your question, please accept it as a solution 😘

View solution in original post

4 REPLIES 4
Expiscornovus
Dual Super User
Dual Super User

Hi @JimmyWork,

 

You could loop through each item of the array, add the [ character to a single item and append it to a Temp array. After the loop you can either use that Temp array value or update the original array.

 

Below is an example of such an approach.

 

"[@{item()}"

 

appendtoarray.png

@Expiscornovus Thank you so much for the quick help

Paulie78
Super User
Super User

Here is another method which is faster and less complicated:

Concat Array.png

 

Blog: tachytelic.net

YouTube: https://www.youtube.com/c/PaulieM/videos

If I answered your question, please accept it as a solution 😘

Great solution, thank you @Paulie78 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (3,777)