Files
DefinitelyTyped/jmespath/jmespath-tests.ts
Jeffery Grajkowski f4e385218b Added JMESPath 0.15.0 (#14685)
* Added JMESPath 0.15.0

* Added tslint to jmespath

* Fix linting issue.
2017-03-10 16:13:26 -08:00

7 lines
433 B
TypeScript

import jmespath = require("jmespath");
const a = jmespath.search({foo: {bar: {baz: [0, 1, 2, 3, 4]}}}, "foo.bar.baz[2]");
const b = jmespath.search({foo: {bar: {baz: [0, 1, 2, 3, 4]}}}, "foo.bar")
const c = jmespath.search({"foo": [{"first": "a", "last": "b"}, {"first": "c", "last": "d"}]}, "foo[*].first");
const d = jmespath.search({"foo": [{"age": 20}, {"age": 25}, {"age": 30}, {"age": 35}, {"age": 40}]}, "foo[?age > `30`]");