File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change 11# jsonpath-js
22
3- [ ![ Link Checker] ( https://github.com/ashphy/jsonpath-js/actions/workflows/lint.yml/badge.svg )] ( https://github.com/ashphy/jsonpath-js/actions/workflows/lint.yml )
43![ GitHub License] ( https://img.shields.io/github/license/ashphy/jsonpath-js )
4+ ![ NPM Version] ( https://img.shields.io/npm/v/jsonpath-js )
5+ [ ![ Link Checker] ( https://github.com/ashphy/jsonpath-js/actions/workflows/lint.yml/badge.svg )] ( https://github.com/ashphy/jsonpath-js/actions/workflows/lint.yml )
56
67An implementation of RFC 9535 [ JSONPath] ( http://goessner.net/articles/JsonPath/ )
78
@@ -11,11 +12,23 @@ An implementation of RFC 9535 [JSONPath](http://goessner.net/articles/JsonPath/)
1112
1213## Install
1314
14- TBD
15+ ```
16+ npm install jsonpath-js
17+ ```
1518
1619## Usage
1720
18- TBD
21+ ``` ts
22+ import { JSONPathJS } from " jsonpath-js" ;
23+
24+ const query = new JSONPathJS (" $.users[*].name" );
25+ const result = query .find ({
26+ users: [{ name: " John Doe" }, { name: " Jane Doe" }],
27+ });
28+
29+ // [ 'John Doe', 'Jane Doe' ]
30+ console .log (result );
31+ ```
1932
2033## Development
2134
You can’t perform that action at this time.
0 commit comments