# Custom Object (JSON)

Defining a field as a Custom object allows you to enter field values as raw JSON.\
\
As long as you adhere to valid JSON syntax, you are free to define anything you like in your very own structure.\
\
If you have a JSON field with this content:

```json
{
  "make": "Audi",
  "model": "RS6" 
}
```

you can use it directly in Liquid:

```liquid
{% assign car = product.metafields.accentuate.specs %}

<p>My car is the brand new {{ car.make }} {{ car.model }}</p>
```

If you need the custom field as a client-side Javascript variable, you can use the JSON filter:

```javascript
<script>
  let car = {{ product.metafields.accentuate.specs | json }}
  alert('My car is the brand new ' + car.make + ' ' + car.model);
</script>
```

### Restrictions&#x20;

JSON objects can be as simple or as complex as you need **but** if you need to create an array of JSON objects, either use repeatable fields (see separate article) or define the array as a property within the JSON object.\
\
An **outer-most array is reserved** for ACF's handling of repeatable JSON fields.\
\
So while this works well:

```json
{
  "colors": ["Red", "Blue", "Green"]
}
```

this will cause ACF to split the values after you save them

```liquid
["Red", "Blue", "Green"]
```


---

# 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://help.accentuate.io/metafield-definitions/fields/field-data-type/acf-field-types/custom-object-json.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.
