# Bundle

Since expressions are executed in isolation from each other, one expression cannot access the variables of another expression. This is achieved by using the *Bundle* object, which is a set of key/value pairs.

### Methods <a href="#h.2av81iyk042f" id="h.2av81iyk042f"></a>

| **Name**         | **Description**                                                                                       |
| ---------------- | ----------------------------------------------------------------------------------------------------- |
| set(key, object) | Sets an object for the specified string key. If the specified key exists, the object will be updated. |
| delete(key)      | Removes the object associated with the specified key from the Bundle object.                          |
| clear()          | Removes all elements from the Bundle object.                                                          |
| get(key)         | Returns an element associated with the specified key from the Bundle object.                          |
| has(key)         | Determines whether the specified key is present in Bundle, returning *true* or *false* accordingly.   |
| pairs()          | Returns an array of objects of the [BundlePair](/scripts/api/bundlepair.md) type.                     |

### Fields <a href="#h.2av81iyk042f" id="h.2av81iyk042f"></a>

| **Name** | **Description**                                       |
| -------- | ----------------------------------------------------- |
| size     | Returns the number of objects in Bundle.              |
| \[ key ] | The indexer allows to access an object by string key. |


---

# 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.monokot.io/scripts/api/bundle.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.
