Closed jkindwall closed 5 years ago
Did npm install jsonpath-plus.
At the top of my script, I have:
const {jsonPath} = require('jsonpath-plus');
Later in my script, I have:
let jpResult = jsonPath({ path: '[?(@.createdBy=="Bob")].name', json: result.json });
When I run this, I get:
(node:18620) UnhandledPromiseRejectionWarning: TypeError: jsonPath is not a function.
Am I missing something?
The case is significant. It should be:
const {JSONPath} = require('jsonpath-plus');
Feel free to comment further, but closing as that should address the question.
Did npm install jsonpath-plus.
At the top of my script, I have:
Later in my script, I have:
When I run this, I get:
(node:18620) UnhandledPromiseRejectionWarning: TypeError: jsonPath is not a function.
Am I missing something?