update jsonpath library

This commit is contained in:
2024-02-08 14:28:40 +00:00
parent f034f4be3d
commit 2af463fbe9
67 changed files with 961 additions and 966 deletions
+4 -6
View File
@@ -1,5 +1,5 @@
import fs from "fs";
import jsonpath from "jsonpath";
import { JSONPath as jsonpath } from "jsonpath-plus";
import useTranslation from "next-translate/useTranslation";
import Head from "next/head";
import { useRouter } from "next/router";
@@ -69,11 +69,9 @@ let Home = (props) => {
let optionsStr = props.appealType.appealTypeOptions.value;
// let selectedObj = jsonpath.query(optionsStr, "$..value");
let selectedObj = jsonpath.query(
optionsStr,
"$..[?(@.attributevalue=='" + router.query.apt + "')]"
let selectedObj = jsonpath(
"$..[?(@.attributevalue=='" + router.query.apt + "')]",
optionsStr
);
//let optionsTitleObj = [];