-
-
Notifications
You must be signed in to change notification settings - Fork 200
Expand file tree
/
Copy pathindex.html
More file actions
83 lines (83 loc) · 2.61 KB
/
index.html
File metadata and controls
83 lines (83 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>JSONPath Demo</title>
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon" />
<link rel="stylesheet" href="index.css" />
</head>
<body>
<h2>JSONPath Demo <i id="demoNode">(To demo on Node instead, see the <a href="https://npm.runkit.com/jsonpath-plus">library on Runkit</a>.)</i>
</h2>
<form onsubmit="return false">
<div class="row">
<label class="grow"><b>JSONPath:</b>
<input type="text" id="jsonpath" placeholder="$.books" value="$..book[?(@parent.bicycle && @parent.bicycle.color === "red")].category" />
</label>
<label><b>eval:</b>
<select id="eval">
<option value="safe">safe</option>
<option value="native">native</option>
<option value="false">false</option>
</select>
</label>
<label><b>ignoreEvalErrors:</b>
<select id="ignoreEvalErrors">
<option value="false">false (default)</option>
<option value="true">true</option>
</select>
</label>
</div>
<div id="jsonSampleContainer" class="container">
<label><b>JSON sample:</b>
<textarea id="jsonSample" placeholder="{"books": []}">
{
"store": {
"book": [
{
"category": "reference",
"author": "Nigel Rees",
"title": "Sayings of the Century",
"price": 8.95
},
{
"category": "fiction",
"author": "Evelyn Waugh",
"title": "Sword of Honour",
"price": 12.99
},
{
"category": "fiction",
"author": "Herman Melville",
"title": "Moby Dick",
"isbn": "0-553-21311-3",
"price": 8.99
},
{
"category": "fiction",
"author": "J. R. R. Tolkien",
"title": "The Lord of the Rings",
"isbn": "0-395-19395-8",
"price": 22.99
}
],
"bicycle": {
"color": "red",
"price": 19.95
}
}
}
</textarea>
</label>
</div>
<div id="resultContainer" class="container">
<label><b>Results:</b>
<textarea id="results"></textarea>
</label>
</div>
</form>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lz-string/1.5.0/lz-string.min.js" integrity="sha512-qtX0GLM3qX8rxJN1gyDfcnMFFrKvixfoEOwbBib9VafR5vbChV5LeE5wSI/x+IlCkTY5ZFddFDCCfaVJJNnuKQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="../dist/index-browser-umd.cjs"></script>
<script src="index.js"></script>
</body>
</html>