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
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"
]
]
@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
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
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']
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1