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.
1 parent 2b1efe6 commit 90fa96aCopy full SHA for 90fa96a
test/test.eval.js
@@ -60,6 +60,20 @@ checkBuiltInVMAndNodeVM(function (vmType, setBuiltInState) {
60
assert.deepEqual(result, expected);
61
});
62
63
+ it('sandbox (with `arguments`)', () => {
64
+ const expected = [json.store.book];
65
+ const selector = "$..[?(@.category === arguments)]";
66
+ const result = jsonpath({
67
+ json,
68
+ path: selector,
69
+ sandbox: {
70
+ arguments: 'reference'
71
+ },
72
+ wrap: false
73
+ });
74
+ assert.deepEqual(result, expected);
75
76
+
77
it('sandbox with function without "function" in string', () => {
78
const expected = [json.store.book];
79
const result = jsonpath({
0 commit comments