# get

## Definition

In a config modifier schema, use `get` to retrieve a value at a given path.

To retrieve a nested property value, use `dot.notation`; a prefix `.` isn’t required. Additionally, we support an `array[index]` notation (e.g., `get: someArray[0].someProperty`).

This value can either be simply returned or used as a starting point for other keywords at the same level or nested below.

> **Copy get path**
>
> You can copy the path to target for the `get` keyword from a JSON payload snapshot within log inspector using the <u>Copy get path</u> option. This copies the path in the schema format so you can paste directly into the config modifier schema. [Learn more about copy options](https://docs.redoxengine.com/permalink/1EFEDDZG8zyMgYVFlG3eoj/#copy-path-options).
>
> _Note:_ This shortcut is for targeting specific fields. If you need to operate on _all_ elements of an array, you might need to [use an array plugin](https://docs.redoxengine.com/permalink/4r50wuxhs82bzn2BU9l03H/#plugin-arrays) instead.  

## Order of execution

This keyword executes in the following order: 

1. `omit`
2. `constant`
3. `references`
4. `use`
5. **`get`**
6. Mutually exclusive keywords at this level:
   - `properties` 
   - `if` 
   - `concat` 
   - `switch` 
   - `pipe` 
   - `merge` 
   - `prefer` 
   - `items`
7. `default`
8. `plugin`

## Example

You can indicate which nested property value to return.

Let’s say you have an MDM message. The `TXA.4.1` value—mapped from a FHIR message and representing activity date/time—is missing and needs to be populated.

**Example: Get input from initial payload**

```json
{
  ...
  "TXA": {
    "1": 1,
    "19": "AV",
    "3": "TX",
    "6": {
      "1": "20250828173111"
    }
  }
}
```

`TXA.6.1`, which represents origination date/time, is already being mapped. A simple approach is to get the value directly from `TXA.6.1` (from the current payload) to map to `TXA.4.1`.

First include `use` to get the HL7v2 output (the current `processedPayload`), then use  `get` to retrieve and map the value at `TXA.6.1` to `TXA.4.1`.

**Example: Get selector**

```json
$.TXA.4.1
```

**Example: Config modifier with get keyword**

```yaml
use: processedPayload
get: TXA.6.1
```

Based on this example config modifier, `TXA.4.1` is now populated.

**Example: Get output**

```json
{
  ...
  "TXA": {
      "1": 1,
      "19": "AV",
      "3": "TX",
      "4": {
        "1": "20250828173111"
      },
      "6": {
        "1": "20250828173111"
      }
  }
}
```
