update jsonpath library
This commit is contained in:
@@ -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 = [];
|
||||
|
||||
Reference in New Issue
Block a user