mirror of
https://github.com/fluencelabs/jsonpath
synced 2025-06-12 23:51:26 +00:00
array keys - js unit test
This commit is contained in:
@ -475,6 +475,16 @@ describe('filter test', () => {
|
||||
done();
|
||||
}
|
||||
});
|
||||
|
||||
it('array keys', (done) => {
|
||||
let result = jsonpath.select({
|
||||
"key1": "value1",
|
||||
"key2": 2
|
||||
}, "$['key1', 'key2']");
|
||||
if (JSON.stringify(result) === JSON.stringify(["value1", 2])) {
|
||||
done();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe('SelectorMut test', () => {
|
||||
|
Reference in New Issue
Block a user