jsonPlug is a post-processor that leverages the JsonPath query language to make simple changes to the output object.
With this module it is possible to delete, add and modify categories and extracted records.
The module depends on the jsonpath module which must therefore be installed too.
When in Studio you install the jsonPlug module in your project, Studio modifies the main.jr file to insert this statement at the beginning of the file:
var jsonPlug = require('modules/jsonPlug');
This is the statement when you install the jsonpath module:
var jsonpath = require('modules/jsonpath');
The statement above sets a variable with an instance of the module so that you can use it in all event handling functions.
This module has to be invoked in the
onFinalize function, because it acts on the analysis results available when this function is run. It has two methods: