Remove a key from an array.
- Service:
CleverAge\ProcessBundle\Transformer\Array\ArrayUnsetTransformer - Transformer code:
array_unset
array. Any other value throws an \UnexpectedValueException.
array: the input array without the given key (unchanged if the key does not exist)
| Code | Type | Required | Default | Description |
|---|---|---|---|---|
key |
string|int |
X | The key to remove |
{id: 1, temporary_field: 'foo'}becomes{id: 1}
# Transformer options level
array_unset:
key: temporary_field