@platyplus/jsonata-schema
v0.1.7
Published
JSONata variables extractor
Downloads
4
Readme
@platyplus/jsonata-schema
JSONata variables extractor
Installation
yarn add @platyplus/jsonata-schema
Usage
import { jsonataPaths } from '@platyplus/jsonata-schema'
const expression = '$sum(Account.Order.Product.(Price * Quantity))'
const schema = jsonataPaths(expression)
console.log(JSON.stringify(schema)) // outputs {"Account":{"Order":{"Product":{"Price":true,"Quantity":true}}}}