Hello,
I use the in build acitivity recognize text from an image or pdf document (where I use PDF). I converted the output to JSON and try to retrieve the 'text' value, But without succes.
My solution:
Compose activity:

I tried outputs(parse_json), Gives back empty value
Error:
InvalidTemplate. Unable to process template language expressions in action 'Compose' inputs at line '0' and column '0': 'The template language expression 'body('Parse_JSON')?['lines']?[0]?['text']' cannot be evaluated because property 'lines' cannot be selected. Array elements can only be selected using an integer index. Please see https://aka.ms/logicexpressions for usage details.'.
Json looks like this (i would like to receive the 'naam' value.:
{
"body": [
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"page": 1,
"lines@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
"lines": [
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"text": "Naam",
"boundingBox": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"left": 0.10807245973450792,
"top": 0.30506994503707,
"width": 0.046878592432144636,
"height": 0.011061075629676564,
"polygon": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"coordinates@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
"coordinates": [
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.10807245973450792,
"y": 0.30506994503707
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.15495105216665256,
"y": 0.30506994503707
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.15364416316751173,
"y": 0.3161310206667466
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.10807245973450792,
"y": 0.3161310206667466
}
]
}
}
}
Appreciate all help.
I have tried initializing an array variable, appending to it with the output of the JSON. But i still can't get the value.
What am i doing wrong? I also tried to moving the [0] before the questionmark, still didn't work.