# push

{% hint style="info" %}
Deprecated. Use [push](/liquid/tags/push.md) tag instead.
{% endhint %}

push adds an element to an array.

#### Example

```javascript
{% json sample_array %}
    [
        "element1",
        "element2",
        "element3"
    ]
{% endjson $}
{% assign sample_array = sample_array | push: "element4" %}
```

Now the content of `sample_array` is: `["element1", "element2", "element3", "element4"]`

{% hint style="info" %}
Using `push` with `assign` might significantly slow down your script. Each time new element is added - new array variable is created.\
\
It is recommended to use [`push`](/liquid/tags/push.md) tag when adding items to an array.
{% endhint %}


---

# 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.datajet-app.com/liquid/filters/push.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.
