You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# JSON Formatter
2
2
3
-
A Open-source Chrome extension that automatically transforms raw JSON data into a beautifully formatted, easy-to-read structure. If you're a developer, data analyst, or someone who frequently works with JSON, this tool is designed to make your life easier.
3
+
An Open-source Chrome extension that automatically transforms raw JSON data into a beautifully formatted, easy-to-read structure. If you're a developer, data analyst, or someone who frequently works with JSON, this tool is designed to make your life easier.
<pclass="lead">JSONPath is a query language for JSON, similar to XPath for XML. It allows you to select and extract data from a JSON document. You use a JSONPath expression to traverse the path to an element in the JSON structure. You start at the root node or element, represented by <code>$</code>, and reach the required element in the JSON structure to extract data from it.</p>
57
-
58
-
<p>A JSONPath expression specifies a path to an element (or a set of elements) in a JSON structure. Paths can use the dot notation:</p>
59
-
60
-
<h2>Syntax</h2>
61
-
<table>
62
-
<tr>
63
-
<th>Symbol</th>
64
-
<th>Description</th>
65
-
</tr>
66
-
<tr>
67
-
<td><code>$</code></td>
68
-
<td>The root object/element</td>
69
-
</tr>
70
-
<tr>
71
-
<td><code>@</code></td>
72
-
<td>The current object/element</td>
73
-
</tr>
74
-
<tr>
75
-
<td><code>. or []</code></td>
76
-
<td>Child operator</td>
77
-
</tr>
78
-
<tr>
79
-
<td><code>..</code></td>
80
-
<td>Recursive descent. JSONPath borrows this syntax from E4X.</td>
81
-
</tr>
82
-
<tr>
83
-
<td><code>*</code></td>
84
-
<td>Wildcard. All objects/elements regardless of their names.</td>
85
-
</tr>
86
-
<tr>
87
-
<td><code>[]</code></td>
88
-
<td>Subscript operator. XPath uses it to iterate over element collections and for predicates. In
89
-
Javascript and JSON it is the native array operator.
90
-
</td>
91
-
</tr>
92
-
<tr>
93
-
<td><code>[,]</code></td>
94
-
<td>Union operator in XPath results in a combination of node sets. JSONPath allows alternate
95
-
names or array indices as a set.
96
-
</td>
97
-
</tr>
98
-
<tr>
99
-
<td><code>[start:end:step]</code></td>
100
-
<td>Array slice operator borrowed from ES4.</td>
101
-
</tr>
102
-
<tr>
103
-
<td><code>()</code></td>
104
-
<td>Script expression can be used as an alternative to JSONPath (using the underlying script
105
-
engine).
106
-
</td>
107
-
</tr>
108
-
<tr>
109
-
<td><code>?()</code></td>
110
-
<td>Applies a filter (script) expression.</td>
111
-
</tr>
112
-
</table>
113
-
114
-
<h2>Examples</h2>
115
-
<table>
116
-
<tr>
117
-
<th>JSONPath</th>
118
-
<th>Description</th>
119
-
</tr>
120
-
<tr>
121
-
<td><code>$.store.book[*].author</code></td>
122
-
<td>All authors of books in the store</td>
123
-
</tr>
124
-
<tr>
125
-
<td><code>$..author</code></td>
126
-
<td>All authors</td>
127
-
</tr>
128
-
<tr>
129
-
<td><code>$.store..price</code></td>
130
-
<td>All prices in the store</td>
131
-
</tr>
132
-
<tr>
133
-
<td><code>$..book[2]</code></td>
134
-
<td>The third book</td>
135
-
</tr>
136
-
<tr>
137
-
<td><code>$..book[(@.length-1)]</code></td>
138
-
<td>The last book</td>
139
-
</tr>
140
-
<tr>
141
-
<td><code>$..book[0,1]</code></td>
142
-
<td>The first two books</td>
143
-
</tr>
144
-
<tr>
145
-
<td><code>$..book[:2]</code></td>
146
-
<td>The first two books</td>
147
-
</tr>
148
-
<tr>
149
-
<td><code>$..book[?(@.isbn)]</code></td>
150
-
<td>All books with an ISBN number</td>
151
-
</tr>
152
-
<tr>
153
-
<td><code>$..book[?(@.price<10)]</code></td>
154
-
<td>All books cheaper than 10</td>
155
-
</tr>
156
-
<tr>
157
-
<td><code>$..*</code></td>
158
-
<td>All members of JSON structure</td>
159
-
</tr>
160
-
</table>
69
+
70
+
<divclass="content-card">
71
+
72
+
<h1>JSON Formatter - User Guide</h1>
73
+
<p>The JSON Formatter Plugin allows you to view, format, and filter JSON data easily. This guide will help you
74
+
understand how to use the filtering functionality effectively.</p>
75
+
<p>The plugin supports three types of filters:</p>
76
+
<ol>
77
+
<li><strong>Key:Value</strong>: A simple filter to match specific key-value pairs.</li>
78
+
<li><strong>Regex</strong>: Regular expressions to match patterns in keys or values.</li>
79
+
<li><strong>JSONPath</strong>: A query language for JSON, similar to XPath for XML.</li>
80
+
</ol>
81
+
<p>To apply a filter:</p>
82
+
<ol>
83
+
<li>Select the filter type from the dropdown menu.</li>
84
+
<li>Enter your filter expression in the input field.</li>
85
+
<li>Click the "Filter" button or press Enter.</li>
86
+
</ol>
87
+
<p>The plugin will then display only the JSON objects or values that match your filter criteria.</p>
88
+
89
+
<h2>1. Using Key:Value filters</h2>
90
+
<p>The key value filters allow you to find objects with exact matches for a specific key-value pair. Let us consider
0 commit comments