Notifications
Announcements
Hi Guys,
I am using the below to get the first element from a "recognise text in image\PDF" output, is there a similar expression to get the second element?
Many thanks
Hi @dmgc,
You can use index numbers for this. [0] will also get the first element, [1] will get the second, [2] the third, etc.
So, in your case try:
item()['lines'][1]['text']
Hi @dmgc
You can try this:
first(take(skip(item()?['lines'],1),1))?['text']
If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.
Thanks
@ManishSolanki @Expiscornovus , both work well, thanks.
As an aside, is there any expression to select First and Second element at the same time? Would save join operations that I am struggling with, seems the join goes badly for me! The join converts each array to string inside a new array element.
Eg:
Element 0
If you want to merge the elements of both select results, then you can use createArray function. In the below expression, I have merged the results of 2 select actions with name 'Select 2' & 'Select 3' in compose action:
createArray(body('Select_2'),body('Select_3'))
This will return the following result in compose action:
[ [ "I am the first page in the PDF. I am some junk text that I do not need, this", "I am another page. I am some junk text that I do not need, this can be" ], [ "12341234", "43214321" ]]
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Michael E. Gernaey 501 Super User 2025 Season 2
Tomac 323 Moderator
abm abm 237 Most Valuable Professional