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
+1 -1
View File
@@ -13,7 +13,7 @@ import { wrapper } from "../../store/store";
import { useRouter } from "next/router";
import { useState } from "react";
import useTranslation from "next-translate/useTranslation";
import jsonpath from "jsonpath";
import { JSONPath as jsonpath } from "jsonpath-plus";
import { reduxForm, formValueSelector } from "redux-form";
import ChangePassword from "../../components/account/changepassword";
+1 -1
View File
@@ -13,7 +13,7 @@ import { wrapper } from "../../store/store";
import { useRouter } from "next/router";
import { useState } from "react";
import useTranslation from "next-translate/useTranslation";
import jsonpath from "jsonpath";
import { JSONPath as jsonpath } from "jsonpath-plus";
import { reduxForm, formValueSelector } from "redux-form";
import RegisterForm from "../../components/account/registerform";
+1 -1
View File
@@ -13,7 +13,7 @@ import { wrapper } from "../../store/store";
import { useRouter } from "next/router";
import { useState } from "react";
import useTranslation from "next-translate/useTranslation";
import jsonpath from "jsonpath";
import { JSONPath as jsonpath } from "jsonpath-plus";
import { reduxForm, formValueSelector } from "redux-form";
import { getSession, useSession } from "next-auth/react";
import NoSessionWarning from "../../components/nosession";
+1 -1
View File
@@ -13,7 +13,7 @@ import { wrapper } from "../../store/store";
import { useRouter } from "next/router";
import { useState } from "react";
import useTranslation from "next-translate/useTranslation";
import jsonpath from "jsonpath";
import { JSONPath as jsonpath } from "jsonpath-plus";
import { reduxForm, formValueSelector } from "redux-form";
import PersonalDetails from "../../components/account/personaldetails";
+1 -1
View File
@@ -13,7 +13,7 @@ import { wrapper } from "../../store/store";
import { useRouter } from "next/router";
import { useState } from "react";
import useTranslation from "next-translate/useTranslation";
import jsonpath from "jsonpath";
import { JSONPath as jsonpath } from "jsonpath-plus";
import { reduxForm, formValueSelector } from "redux-form";
import RegisterForm from "../../components/account/registerform";
+2 -2
View File
@@ -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 + '")]',
+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 = [];
+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 = [];