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 -4
View File
@@ -1,5 +1,5 @@
import Link from "next/link";
import jsonpath from "jsonpath";
import { JSONPath as jsonpath } from "jsonpath-plus";
import _ from "lodash";
import { useState } from "react";
import { useRouter } from "next/router";
@@ -20,9 +20,9 @@ const Breadcrumbs = (props) => {
if (_.isEmpty(courseContent)) {
return null;
} else {
var sectionObj = jsonpath.query(
courseContent,
'$..sections[?(@.path=="/' + coursePageURL + '")]'
var sectionObj = jsonpath(
'$..sections[?(@.path=="/' + coursePageURL + '")]',
courseContent
);
var breadcrumb = sectionObj[0].chapter.title; //sectionObj[0].chapter
return (