update jsonpath library
This commit is contained in:
@@ -25,7 +25,7 @@ import {
|
||||
consoleLogger,
|
||||
getLPA,
|
||||
} from "../../../actions";
|
||||
import jsonpath from "jsonpath";
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
@@ -48,7 +48,7 @@ export default async function ApiProxy(req, res) {
|
||||
|
||||
const lpaList = await getLPA();
|
||||
|
||||
const lpaGUID = jsonpath.query(lpaList, '$..[?(@.name=="' + lpaid + '")]');
|
||||
const lpaGUID = jsonpath('$..[?(@.name=="' + lpaid + '")]', lpaList);
|
||||
|
||||
console.log(
|
||||
'$..[?(@.name="' + lpaid + '")]',
|
||||
|
||||
Reference in New Issue
Block a user