extract_jsonpath

Function extract_jsonpath 

Source
pub fn extract_jsonpath(document: &Value, path: &str) -> Result<Value, String>
Expand description

Extract a value from a JSON document using a simplified JSONPath expression.

Supports:

  • $ – the root object
  • $.field – a field access
  • $.field.subfield – nested field access
  • $.field[0] – array index

This is a minimal implementation for the aggregation plugin. A full JSONPath implementation (filter expressions, wildcards, etc.) would use a dedicated crate.