Method Standards.JSONPath.Query()->apply()

class Standards.JSONPath.Query

Method apply

array apply(mixed json_value, mixed|void root_value)

Description

Apply the compiled expression on a JSON-compatible value.

Parameter json_value

Value to operate on.

Parameter root_value

Value that the '$'-operator should refer to. Defaults to json_value. Typically only relevant when operating on sub-expressions.

Returns

Returns an array with the matching selected values. If no values matched, the empty array ({}) will thus be returned.