---
updatedAt: 2025-05-20T20:29:09.000Z
agentTools:
  projectIndex: https://docs.documotor.com/llms.txt
---

# items

Convert an object into an array of its properties

# Definition

`array items(object $object)`

Converts an object into an array where each key-value pair is turned into a two-element subarray of key and value.

# Parameters

<Glossary>object</Glossary> `$object`

Object to convert to array.

# Returns

<Glossary>array</Glossary>

Array representation of `$object`.

# Examples

```text Transformation
{
  items: items({name1: 'value1', name2: 'value2'}),
  empty: items(`{}`)
}
```

```json Result
{
  "items": [
    [
      "name1",
      "value1"
    ],
    [
      "name2",
      "value2"
    ]
  ],
  "empty": []
}
```