Hi All,
I am sending some invoices in pdf format to azure form recognizer from power automate. I am getting the JSON output that is way complex.
I want to get all the line item details such as the description,amount, quantity, unit price etc from the JSON output but so far i am able to get only the first line item.
Please help me out in this.
I am using the parse json object and after that in the select action i am using this expression (
)
as this code returns only the first item description is there a way to get all the available descriptions in the available JSON
I am attaching the JSON output in here so you can check.
Hi @Ratnesh_Chitko ,
I just initialized a sting variable to hold the JSON of yours and use these two actions to parse and get values.
Best regards,
Hi @v-jefferni ,
Can you please post the whole flow so i can uinderstand it completely
Hi @Ratnesh_Chitko ,
I managed to parse the JSON and get what you need, please refer to below screenshots:
Result:
expression for From of Select:
json(YourJsonString)['analyzeResult']['documents'][0]['fields']['items']['valueArray']
field values in Select:
@item()['valueObject']['description']['content']
@item()['valueObject']['amount']['content']
@item()['valueObject']['quantity']['content']
etc.
Best regards,