# 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](https://docs.monokot.io/scripts/api/bundlepair) 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. |
