json

Checks JSON messages against a logical operator and an argument.

json:
operator: exists
path: ""
arg: ""

Fields

operator

string A logical operator to check with.

Options are: exists, equals, contains.

path

string The path of a specific field within JSON documents to check.

arg

string An argument to check against. May not be applicable for all operators.

part

number The index of a message within a batch to test the condition against. This field is only applicable when batching messages at the input level.

Indexes can be negative, and if so the part will be selected from the end counting backwards starting from -1.

Operators

exists

Checks whether the target path exists within a document. If the path is the root (empty or '.') then it simply checks that the document is valid JSON.

equals

Checks whether the target path exists and matches the argument.

contains

Checks whether the target path is an array containing the argument.