We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
slice
1 parent 2a57053 commit 82ebc5bCopy full SHA for 82ebc5b
1 file changed
test/test.slice.js
@@ -0,0 +1,11 @@
1
+describe('JSONPath - slice', function () {
2
+ const json = {
3
+ "name": "root",
4
+ "children": {}
5
+ };
6
+ it('should return empty array if slicing non-array', function () {
7
+ const expected = undefined;
8
+ const result = jsonpath({json, path: '$.children[1:3]', wrap: false});
9
+ assert.deepEqual(result, expected);
10
+ });
11
+});
0 commit comments