Jaxon.Stream.query
You're seeing just the function
query
, go back to Jaxon.Stream module for more information.
Specs
query(event_stream(), Jaxon.Path.t()) :: term_stream()
Query all values of an array:
iex> ~s({ "numbers": [1,2] })
...> |> Jaxon.Stream.from_binary()
...> |> Jaxon.Stream.query([:root, "numbers", :all])
...> |> Enum.to_list()
[1, 2]
Query an object property:
iex> ~s({ "person": {"name": "Jose"} })
...> |> Jaxon.Stream.from_binary()
...> |> Jaxon.Stream.query([:root, "person", "name"])
...> |> Enum.to_list()
["Jose"]