Skip to main content

Notifications

Community site session details

Community site session details

Session Id : Jq97eG0hcEy4oU37S0cwA7
Power Automate - General Discussion
Answered

remove last element from array

Like (2) ShareShare
ReportReport
Posted on 30 Jul 2021 13:37:03 by 48

Hi 

 

I'm having an array like this ["a","b","c","d","e"] now i want to remove last 2 elements from array. is there any possibility to do so ?

  • Verified answer
    JuanPJesusG Profile Picture
    47 on 01 Aug 2021 at 18:49:13
    Re: remove last element from array

    Hi,

     

    You can use this function 

    take(outputs('Compose'),add(length(outputs('Compose')),-2))
     
    JuanPJesusG_0-1627843668791.pngJuanPJesusG_1-1627843687024.png

    Best regards,

    JP

    --------------------------------------------------------------------------
    If I have answered your question, please mark my post as a solution
    If you have found my response helpful, please give it a thumbs up

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!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,702 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard
Loading started