Hi guys,
This would be my first post here and one issue has me scratching and pulling all nighters. Its addictive!..
Here are my pics.
I have an email attachment for a pdf which is first fed into a variable (string type)
Then conditioned.
and finally passed trough AI for image recognition.
The value is then embedded into a string variable.
However now I simply need to get the Text value from here in the above [0] string. It is not an array so I cannot pass it though filter array function. Tried many alternatives with split() function and item()? type as well but of no use.
From a total of 1200 lines I need to only filter those starting with "text:" values and then append them as an array into a sharepoint file. Just..that..simple 😕
Would be really grateful if some of the experts here can shed some light on to it. Eagerly awaiting your replies!
Sadly don't know how to do this here via json 😕
Hi @Anonymous
The logic i would suggest is to utilize the keys in json. First try to get all keys in json array using the approach below
https://powerusers.microsoft.com/t5/General-Power-Automate/Getting-JSON-keys-in-flow/td-p/99743
Once u get the keys u know that that key (in your case 2163) will be always at fixed position, so use the index to find that key and then once key is found, use it in json to get the value 🙂
Hope this helps !
Thanks @Nived_Nambiar but the value '2163' will keep on changing. How we can extract it without any key?
Hi @Anonymous
see this
Hope it helps
Hi @Nived_Nambiar Can you pls explain with an example in the above case for any one value?
Hi @Anonymous
if the value is dynamic, if you know that value from flow , then u can store that in variable and pass that variable in key in json for getting value 🙂
Hi @Nived_Nambiar what if the value '2603' is dynamic?. Meaning it is changing every time. Then can I simply use index?
Hi @Anonymous
Have your parsed the json before using select action ?
Hi @Anonymous
If you know the index where the element is placed, then use index approach and specify the key (number in this case) to get the value
for example: if the element is at index 4 in the array, for the number 2603, then use the below operation to retrive value corresponding to 2603
variables('array')?[4]?['2603']
where array is variable name for array used in flow.
Hope this helps 🙂
WarrenBelz
146,618
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,962
Most Valuable Professional