update jsonpath library
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import jsonpath from "jsonpath";
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import { connect } from "react-redux";
|
||||
@@ -101,12 +101,12 @@ let CreateCase = (props) => {
|
||||
value={optionsObj[key].accountid}
|
||||
>
|
||||
{router.locale == "cy"
|
||||
? jsonpath.query(
|
||||
transLookup,
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
optionsObj[key]
|
||||
.name +
|
||||
'")].value_cy'
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: optionsObj[key].name}
|
||||
</option>
|
||||
@@ -192,12 +192,12 @@ let CreateCase = (props) => {
|
||||
)
|
||||
? ""
|
||||
: router.locale == "cy"
|
||||
? jsonpath.query(
|
||||
transLookup,
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
optionsObj[key]
|
||||
.value +
|
||||
'")].value_cy'
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: optionsObj[key].value}
|
||||
</option>
|
||||
|
||||
Reference in New Issue
Block a user