Skip to main content

Notifications

Community site session details

Community site session details

Session Id : /2LorDlEKExB97gbj+eo8C
Power Automate - General Discussion
Answered

Remove brackets and commas from array

Like (1) ShareShare
ReportReport
Posted on 4 Jan 2023 09:47:19 by 776

Hello Expert,

 

Please provide some guidance on the expression that will work here.

 

Basically, I capture something in the compose action - something like -> ["SharePoint", "Microsoft Teams"]

 

The content inside the brackets may contain one or more elements (it depends)

 

I am using this expression 

replace(replace(string(outputs('Compose_4')),'[',''),']','')

But it only replaces the bracket NOT the commas

 

AshishJaiswal_0-1672825585837.png

 

I need help to get an expression that remove bracket as well as commas, regardless the number of element inside the bracket.

 

 

  • AshishJaiswal Profile Picture
    776 on 04 Jan 2023 at 10:47:07
    Re: Remove brackets and commas from array

    @Hardesh15 thank you brother - this works like a charm !!

     

    Happy New Year !!!

  • VictorIvanidze Profile Picture
    12,214 on 04 Jan 2023 at 10:34:14
    Re: Remove brackets and commas from array

    Hi @AshishJaiswal ,

    I don't see any comma. You initial problem  was "But it only replaces the bracket NOT the commas", correct?

  • Verified answer
    Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on 04 Jan 2023 at 10:26:23
    Re: Remove brackets and commas from array

    @AshishJaiswal  Use one more replace()

    replace(replace(replace(string(outputs('Compose_4')),'[',''),']',''),'"','')

     

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

  • AshishJaiswal Profile Picture
    776 on 04 Jan 2023 at 10:17:39
    Re: Remove brackets and commas from array

    Hello  @VictorIvanidze 

    I added a picture in the post, No worries I will added it again 

    Used this expression - 

    replace(replace(string(outputs('Compose_4')),'[',''),']','')

     

    AshishJaiswal_0-1672827427278.png

    I need guidance to remove bracket and inverted commas both at the same time 

  • VictorIvanidze Profile Picture
    12,214 on 04 Jan 2023 at 09:54:31
    Re: Remove brackets and commas from array

    Show what you want to get after handling  ["SharePoint", "Microsoft Teams"]

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard