# Glob Functions

IoTIFY provides a simple, fast and persistent key-value storage that is private to your workspace and accessible to all your running jobs. The key-value storage could be used for multiple purposes, For example, to sync between multiple jobs, control the simulation behaviour dynamically or revert back from the last state of the device.&#x20;

The different functions that you can use to interact with the Glob are:

#### SET

```javascript
//requires a string key and a value which can be of any type
glob.set(key, value)

glob.set('key1', 55);
glob.set('key2', "Hello World");
glob.set('key3', {"Hello" : "World"});
```

#### GET

```javascript
//requires a string key as an argument
glob.get(key)

let val1 = glob.get('key1'); 
let val2 = glob.get('key2'); 
let val3 = glob.get('key3'); 

console.log("value 1: "+ val1)
console.log("value 2: "+ val2)
console.log("value 3: "+ JSON.stringify(val3))
```

{% code title="Response:" %}

```json
value 1: 55 value 2: Hello World value 3: {"Hello":"World"}
```

{% endcode %}

#### DELETE

```javascript
//requires a string key as an argument
glob.delete(key)

glob.delete('key1');
```


---

# 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.iotify.io/additional-helpers/iotify-helpers/glob-functions.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.
