# json-pluck
[](https://crates.io/crates/json-pluck)
Pluck a single value out of a `serde_json::Value` by dotted path or a
tiny subset of JSONPath. Forgiving, built for LLM-emitted JSON where
the answer is buried under unpredictable wrappers.
```rust
use json_pluck::pluck;
use serde_json::json;
let v = json!({ "result": { "items": [{ "value": 1 }, { "value": 42 }] } });
assert_eq!(pluck(&v, "result.items[1].value"), Some(&json!(42)));
assert_eq!(pluck(&v, "result.items[-1].value"), Some(&json!(42)));
assert_eq!(pluck(&v, "**.value"), Some(&json!(1)));
```
`**.field` BFS-searches the whole tree for the first match. MIT or
Apache-2.0.