# In-Memory DB Functions

In-Memory DB Functions are used to write/read objects to the memory zone.

## Get Object <a href="#get-object" id="get-object"></a>

#### Object ins.getGlobalObject(String name) <a href="#object-ins-getglobalobject-string-name" id="object-ins-getglobalobject-string-name"></a>

Reads an object in memory.

name : Name of the object.

Return Value: Returns a JSON object.

#### Syntax

```javascript
var obj=ins.getGlobalObject("My_Obj");
if (obj!==null) {
  var item="Previous_Value";
    if (obj[item]!==null) {
      ins.notify("info","Get Global Object",obj[item]);
   }
}
return obj[item];
```

## Set Object <a href="#set-object" id="set-object"></a>

#### Object ins.setGlobalObject(String name) <a href="#object-ins-setglobalobject-string-name" id="object-ins-setglobalobject-string-name"></a>

Writes an object to memory.

name: Object name.

Return Value: Does not return any value.

#### Syntax

```javascript
var My_Obj={};
My_Obj.Previous_Value=0;
My_Obj.Message="Hello World";
ins.setGlobalObject("My_Obj",My_Obj);
```
