diff --git a/lib/Input-value-cache.js b/lib/Input-value-cache.js index 04fa57f..9ed0c67 100644 --- a/lib/Input-value-cache.js +++ b/lib/Input-value-cache.js @@ -1,6 +1,6 @@ 'use strict' -const jp = require('jsonpath') +const {JSONPath} = require('jsonpath-plus'); class InputValueCache { constructor () { @@ -14,7 +14,7 @@ class InputValueCache { return this.cache[inputPath] } - let value = jp.query(values, inputPath) + let value = JSONPath({path: inputPath, json: values, wrap: false}) if (Array.isArray(value)) { const l = value.length diff --git a/package.json b/package.json index cb8f119..0ee83f7 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ }, "main": "./lib/index.js", "dependencies": { - "jsonpath": "1.1.1", + "jsonpath-plus": "10.3.0", "lodash": "4.17.21" }, "devDependencies": {