# Handlebars syntax

Here's a short guide to Handlebars syntax. For more information, consult the official Handlebars [documentation](https://handlebarsjs.com/).

## Variables

You refer to variables like this:

```yaml
{{ variable_name }}
```

If the variable is an object with properties of its own, you can refer to them like so:

```yaml
{{ person.firstName }}
```

This is how you refer to a specific index of an array:

```yaml
{{ people.[0] }}
```

## Comments

You can use Handlebars comments in your files. Commented out sections won't show up in the final rendered output.

```yaml
{{! This comment will not show up in the output}}
```

If the content you want to comment out contains `}}` or other Handlebars tokens, you need to use different comment style:&#x20;

```yaml
{{!-- This comment may contain mustaches like }} --}}
```

## If-conditions

Here's an example of if-condition:

```yaml
{{#if some_variable}}
  this will be included in the output
{{/if}}
```

## Iterating over collections

This is how you iterate over a collection of items:

```yaml
{{#each securityGroupIds}}
  - {{this}}
{{/each}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.takomo.io/variables/handlebars-syntax.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
