# Add or update struct field
> Supported in: Batch, Faster, Streaming
Updates a field of a struct or adds a new field.
**Expression categories:** Struct
## Declared arguments
* **Expression:** Expression to update struct field with.
*Expression\*
* **Locator:** Locate inner elements with multiple entries like \['author', 'email'].
*StructLocator*
* **Struct:** The struct to update.
*Expression\*
**Output type:** *Struct*
## Examples
### Example 1: Base case
**Argument values:**
* **Expression:** `value`
* **Locator:** flight
* **Struct:** `struct`
| struct | value | **Output** |
| ----- | ----- | ----- |
| {
**airline**: {
**id**: NA,
},
} | foo | {
**airline**: {
**id**: NA,
},
**flight**: foo,
} |
***
### Example 2: Base case
**Argument values:**
* **Expression:** `value`
* **Locator:** flight
* **Struct:** `struct`
| struct | value | **Output** |
| ----- | ----- | ----- |
| {
**airline**: {
**id**: FE,
},
} | {
**id**: 1,
} | {
**airline**: {
**id**: FE,
},
**flight**: {
**id**: 1,
},
} |
***
### Example 3: Base case
**Argument values:**
* **Expression:** `value`
* **Locator:** airline.id
* **Struct:** `struct`
| struct | value | **Output** |
| ----- | ----- | ----- |
| {
**airline**: {
**id**: NA,
},
} | 1 | {
**airline**: {
**id**: 1,
},
} |
| {
**airline**: {
**id**: FE,
},
} | 2 | {
**airline**: {
**id**: 2,
},
} |
***
### Example 4: Null case
**Argument values:**
* **Expression:** `value`
* **Locator:** airline.id
* **Struct:** `struct`
| struct | value | **Output** |
| ----- | ----- | ----- |
| *null* | *null* | *null* |
| *null* | 1 | *null* |
| {
**airline**: {
**id**: FE,
},
} | *null* | {
**airline**: {
**id**: *null*,
},
} |
***