Announcements
Hi,
I have an array of key/value pairs that looks like this:
[{"ID": "https://knowledgebase.com/link_to_article_1"},{"Title": "Title of Article 1"},{"ID": "https://knowledgebase.com/link_to_article_2"},{
"Title": "Title of Article 2"
}]
How can I combine consecutive array elements so that it looks like this instead?
[{"ID": "https://knowledgebase.com/link_to_article_1","Title": "Title of Article 1"},{"ID": "https://knowledgebase.com/link_to_article_2","Title": "Title of Article 2"}]
Hi @rleonen ,
You need to use Select action to get the required data. This action maps the data from input to output.
in your case all you need to do map like this
ID --> item()?['ID']
Title-->item()?['Title']
Thanks
That suggestion is close but I don't get the consecutive rows combined into a single element. The output after using the 'Select' action now looks like below. Is there a way to combine the consecutive rows into a single element?
Take a look at this screenshot (I also included run history on right hand side). It does what you want. If you have any trouble following, I will explain in more detail:
https://ibb.co/v42ZHFZ
Blog: tachytelic.net
YouTube: https://www.youtube.com/c/PaulieM/videos
If I answered your question, please accept it as a solution 😘
Hi @rleonen
A lot simpler way of doing it, is just by using a select like @ManishJain has suggested and using some of @Paulie78 length logic. It can be done in one simple action as follows:
Your from is
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.Cheers,Damien P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉
Thanks Damien - solution works perfectly!
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.
Congratulations to our 2026 Super Users!
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Vish WR 997
Valantis 810
Haque 642