The "Parse text" block is used to parse the contents of a text field containing JSON or XML and output one or more records resulting from each cell.

It treats each individual cell in the input data field as if it were an entire text file, and then tries to interpret each ‘file’ (here a cell) as JSON/XML. The resulting data is appended for all cells, similar to how Omniscope's Batch Append block works for actual files.


A typical use case for this block is to parse the output of a Batch HTTP block. For example, consider a REST API endpoint returning structured data encoded as JSON object. We can use the Batch Http block to invoke the REST API endpoint multiple times, based on a set of parameters.


The Batch HTTP block will output a record for each REST API endpoint call, and the JSON document will be within one of the fields in the output record. We can use the Parse text block to parse and extract the tabular data from each document.




N.B. In order to leverage the automatic configuration of data structure, the block connected to the input of the parse text block must be fully executed.


In a wider context - this block's functionality will allow you to parse data from an XML file, or JSON retrieved from an API, or nested in some other source, and easily reformat and analyse it in your report.


Attached to this article is the IOZ demo file demonstrating how to extract crypto tokens price from an API.