> For the complete documentation index, see [llms.txt](https://docs.no-reducer.com/no-reducer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.no-reducer.com/no-reducer/no-reducer-actions/create/create-an-object-array.md).

# create an object/array

**Create nested objects and arrays**\
I will create my own **`json`**&#x64;ata with nested objects and arrays called **`MyClass`**

```javascript
dispatch(create('MyClass', 
{
name: 'Computer',
students: [
    {
        id: 1,
        name: 'Bill Gate',
        companies: [{ cid: 1, name: 'Microsoft', found: 1975 }]
    },
    {
        id: 2,
        name: 'Steve Jobs',
        companies: [{ cid: 2, name: 'Apple', found: 1976 }]
    },
    {
        id: 3,
        name: 'Elon Musk',
        companies: [{ cid: 3, name: 'Tesla', found: 2003, 
        cars: [
        { mid: 1, n: 'Model X' }, 
        { mid: 2, n: 'Model Y' }, 
        { mid: 3, n: 'Model S' }] }, 
        { cid: 4, name: 'Paypal', found: 1999 }],
    },
    {
        id: 4,
        name: 'Mark Zuckerberg',
        companies: [{ cid: 5, name: 'Facebook', found: 2004 }]
    },
]
}));
```

<br>

<figure><img src="https://2096029297-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa8hQdsN7Pv00B1Pt9tuc%2Fuploads%2FyYEoJEy2OMfjlmBhhTl4%2F68747470733a2f2f766e73656174746c652e636f6d2f64796e616d6963526564756365722f437265617465644f626a6563744e6573746564322e706e67.png?alt=media&amp;token=3b40e8b2-3833-4382-9875-24ef9216a81e" alt=""><figcaption></figcaption></figure>

<br>
