Global

Methods

jsonataExtended(expr, options) → {Object}

Source:
See:
Return a JSONata expression object that includes the custom functions registered
Example

Example using the extended JSONata as a dropin replacement for the standard JSONata NPM

// const jsonata = require('jsonata');
const jsonata = require('jsonata-extended');
const expr = jsonata('$htmltotext("<p>Leadership has a dark side; a &#34;leadership shadow&#34; that often creates an unknown; lurking fear.</p>")');
const result = expr.evaluate();
Try on RUNKIT
// const jsonata = require('jsonata');
const jsonata = require('jsonata-extended');
const expr = jsonata('$htmltotext("<p>Leadership has a dark side; a &#34;leadership shadow&#34; that often creates an unknown; lurking fear.</p>")');
const result = expr.evaluate();
Parameters:
Name Type Description
expr Object JSONata expression JSONata NPM
options Object
Properties
Name Type Description
recover: boolean attempt to recover on parse error
RegexEngine: function RegEx class constructor to use
Returns:
Evaluated expression
Type
Object