# set_vars

The `set_vars` step.

Sets variables from templates, as a map of variable name to template; each is readable later as `{{vars.<name>}}`.

Type: `map of string`

Every step also takes the [common step keys](https://docs.kaab.ist/reference/dsl/steps#common-keys): `expect`, `id`, `if`, `name`, `on_error`, `optional`, `retry`, `side_effect`, `timeout_ms`, `x_kaab`.

## Example

```json
{
  "set_vars": {
    "first_price": "{{vars.prices[0]}}"
  }
}
```

From the contract fixture `capture-response`, a program the test suite validates.
