github.com/Jeffail/benthos/v3@v3.65.0/website/docs/configuration/field_paths.md (about)

     1  ---
     2  title: Field Paths
     3  ---
     4  
     5  Many components within Benthos allow you to target certain fields using a JSON dot path. The syntax of a path within Benthos is similar to [JSON Pointers][json-pointers], except with dot separators instead of slashes (and no leading dot.) When a path is used to set a value any path segment that does not yet exist in the structure is created as an object.
     6  
     7  For example, if we had the following JSON structure:
     8  
     9  ```json
    10  {
    11    "foo": {
    12      "bar": 21
    13    }
    14  }
    15  ```
    16  
    17  The query path `foo.bar` would return `21`.
    18  
    19  The characters `~` (%x7E) and `.` (%x2E) have special meaning in Benthos paths. Therefore `~` needs to be encoded as `~0` and `.` needs to be encoded as `~1` when these characters appear within a key.
    20  
    21  For example, if we had the following JSON structure:
    22  
    23  ```json
    24  {
    25    "foo.foo": {
    26      "bar~bo": {
    27        "": {
    28          "baz": 22
    29        }
    30      }
    31    }
    32  }
    33  ```
    34  
    35  The query path `foo~1foo.bar~0bo..baz` would return `22`.
    36  
    37  ## Arrays
    38  
    39  When Benthos encounters an array whilst traversing a JSON structure it requires the next path segment to be either an integer of an existing index, or, depending on whether the path is used to query or set the target value, the character `*` or `-` respectively.
    40  
    41  For example, if we had the following JSON structure:
    42  
    43  ```json
    44  {
    45    "foo": [
    46      0, 1, { "bar": 23 }
    47    ]
    48  }
    49  ```
    50  
    51  The query path `foo.2.bar` would return `23`.
    52  
    53  ### Querying
    54  
    55  When a query reaches an array the character `*` indicates that the query should return the value of the remaining path from each element of the array (within an array.)
    56  
    57  ### Setting
    58  
    59  When an array is reached the character `-` indicates that a new element should be appended to the end of the existing elements, if this character is not the final segment of the path then an object is created.
    60  
    61  [json-pointers]: https://tools.ietf.org/html/rfc6901