query


Description:

public static JsonValue? query (JsonValue root, string path)

Queries a value by JSON path expression.

Supports `$.key`, `$.key[index]`, and nested paths like `$.users[0].address.city`.

Example:

    var city = Json.query (root, "$.users[0].address.city");

Parameters:

root

the root value.

path

the JSON path expression starting with `$`.

Returns:

the value at the path or null if not found.