> ## Documentation Index
> Fetch the complete documentation index at: https://docs.forest.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Data Types

> Reference of data types available in Forest

Fields on Forest can either use `Primitive Types` or `Composite Types`.

## Primitive types

The primitive types which are supported by Forest are the following:

| Forest Type | Language Type |
| - | - |
| Boolean | Boolean |
| Date | String with format "1985-10-26T01:22:00-08:00Z" (ISO-8601) |
| Dateonly | String with format "1985-10-26" |
| Enum | String |
| JSON | Any JSON compatible value |
| Number | Number |
| Point | Array of 2 Numbers |
| String | String |
| Timeonly | String with format "01:22:00" |
| Uuid | String with uuid v4 format |

## Composite types

<Info>
  * Fields using composite types are not sortable and do not implement validation.
  * Fields that are an array of a primitive type **only** are filterable (depending on the data source).
</Info>

```js theme={null}
// Object containing 2 strings
const typeOfObjectWithTwoStrings = { firstName: 'String', lastName: 'String' };

// Array of strings
const typeOfArrayOfStrings = ['String'];

// Array of objects
const typeOfArrayOfObjects = [{ content: 'String' }];

// Object containing a 2d-grid of numbers
const typeOfObjectContainingAGridOfNumbers = { content: [['Number']] };
```

When using composite types, the data in the UI may not be displayed as you expect!

| Composite Type | Example | How it gets displayed |
| - | - | - |
| Array of primitive type | `[ 'array', 'of', 'strings']` | As a custom widget in the edition form |
| Object | `{ title: "the godfather"}` | As a nested form in the edition form |
| Array of object | `[{ title: "the shawshank redemption"}]` | As a new collection in Related Data section |
| Array of object (with nested objects) | `[{ rating: { kind: 'MPA", value: "PG-13" } }]` | JSON editor in the edition form |
| Anything else | | JSON editor in the edition form |

If you want to force displaying your data as a new Collection in the Related Data section, but can't because your data model contains nested objects, you may consider typing all nested objects as `'JSON'`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.