github.com/Jeffail/benthos/v3@v3.65.0/website/docs/components/conditions/check_field.md (about)

     1  ---
     2  title: check_field
     3  type: condition
     4  status: stable
     5  ---
     6  
     7  <!--
     8       THIS FILE IS AUTOGENERATED!
     9  
    10       To make changes please edit the contents of:
    11       lib/condition/check_field.go
    12  -->
    13  
    14  import Tabs from '@theme/Tabs';
    15  import TabItem from '@theme/TabItem';
    16  
    17  
    18  Extracts the value of a field identified via [dot path](/docs/configuration/field_paths)
    19  within messages (currently only JSON format is supported) and then tests the
    20  extracted value against a child condition.
    21  
    22  
    23  <Tabs defaultValue="common" values={[
    24    { label: 'Common', value: 'common', },
    25    { label: 'Advanced', value: 'advanced', },
    26  ]}>
    27  
    28  <TabItem value="common">
    29  
    30  ```yaml
    31  # Common config fields, showing default values
    32  check_field:
    33    path: ""
    34    condition: {}
    35  ```
    36  
    37  </TabItem>
    38  <TabItem value="advanced">
    39  
    40  ```yaml
    41  # All config fields, showing default values
    42  check_field:
    43    path: ""
    44    condition: {}
    45    parts: []
    46  ```
    47  
    48  </TabItem>
    49  </Tabs>
    50  
    51  ## Fields
    52  
    53  ### `path`
    54  
    55  A [field path](/docs/configuration/field_paths) to check against the child condition.
    56  
    57  
    58  Type: `string`  
    59  Default: `""`  
    60  
    61  ### `condition`
    62  
    63  A child condition to test the field contents against.
    64  
    65  
    66  Type: `object`  
    67  Default: `{}`  
    68  
    69  ### `parts`
    70  
    71  An optional array of message indexes of a batch that the condition should apply to.
    72  If left empty all messages are processed. This field is only applicable when
    73  batching messages [at the input level](/docs/configuration/batching).
    74  
    75  Indexes can be negative, and if so the part will be selected from the end
    76  counting backwards starting from -1.
    77  
    78  
    79  Type: `array`  
    80  Default: `[]`  
    81  
    82