In my app I want to use json path. I found this library, but I cannot get it to work from my app.
Per the documentation I installed the library and put this line in my component:
import {JSONPath} from 'jsonpath-plus';
But I received an error when I tried to do this:
const blob = JSONPath(path, jsonData, null, null);
Error:
ERROR in ./node_modules/jsonpath-plus/dist/index-es.js
Module not found: Error: Can't resolve 'vm' in 'C:\urm\workspace-1.0.0.2-URM\esploro-web\src\main\ngapp\node_modules\jsonpath-plus\dist'
Any idea how to make it work? Another way to use jsonPath using Angular?
According to the documentation
ESM (Modern browsers) You may also use ES6 Module imports (for modern browsers):
ESM (Bundlers) Or if you are bundling your JavaScript (e.g., with Rollup), just use:
Try using first one. I guess that will help.