Filter data from JSON

Hi,
I am using Microsoft OCR Cognitive API to extract data from scan copy of invoice. It return JSON data. From JSON data i want to filter only invoice number at run time. Please help me.

HI @bhuvan

There are multiple options for you to deal with JSON data.

You can use JSON activity to extract the desired data by selecting Getter Action for extracting desired data from your JSON output

image

In case you want to loop your JSON data, you can make use of Advanced Loop Activity.

image

PFB the links which can help you to understand this further -

JSON Activity
https://www.edgeverve.com/assistedge/knowledge-base/RPA19.1/Automation_Studio/Configuring-Automation-Processes/Process_Components/JSON/JSON_Activity.htm

Advanced Loop
https://www.edgeverve.com/assistedge/knowledge-base/RPA19.1/Automation_Studio/Configuring-Automation-Processes/Complex_Iterators/Advanced_Loop.htm

@prateek.mantri Thanks for your response.

Working with Advance Loop(JSON) is quite complicated. Do we have any activity to covert JSON data into Table?

Hi @bhuvan

Can you share your use case, if possible?

Certain JSON data can be as simple as a list of key-value pairs while some JSON data can be nested within another JSON or can have arrays of values.

So having an activity to convert a JSON directly into a table is challenging without knowing the structure of JSON.

As explained in my use case - i am using OCR API to extract invoice details. It return complex JSON structure.

For stability in extracting invoice data, Enterprise users can also set up XtractEdge Platform. Refer -

https://www.edgeverve.com/xtractedge-platform/

For more details -

https://www.edgeverve.com/contact/

@bhuvan

If you want to extract only one invoice number from the JSON data, then using JSON getter is the best option.

It will work only when your invoice number is coming at same location for all your documents in your JSON data.
Otherwise as @sumit.sagar suggested, please use XtractEdge Platform