---
title: Overview
noindex: true
---

<Danger>
  **Legacy Docs:** This page describes our legacy API. It will be deprecated in
  a future version. Please use the [v2 API](/) where possible.
</Danger>

Use `.` to search over text values nested inside JSON. For instance, the following query searches over a field with values like `{"metadata": {"color": "white"}}`.

<CodeGroup>
```sql Function Syntax
SELECT description, rating, category
FROM mock_items
WHERE id @@@ paradedb.term('metadata.color', 'white');
```
```sql JSON Syntax
SELECT description, rating, category
FROM mock_items
WHERE id @@@
'{
    "term": {
        "field": "metadata.color",
        "value": "white"
    }
}'::jsonb;
```
</CodeGroup>

The following query builder functions support JSON fields: [term](/legacy/advanced/term/term), [term set](/legacy/advanced/term/term-set), [fuzzy term](/legacy/advanced/term/fuzzy-term), [phrase](/legacy/advanced/phrase/phrase), [match](/legacy/advanced/full-text/match), [phrase prefix](/legacy/advanced/phrase/phrase-prefix), and [range](/legacy/advanced/term/range).

## Datetime Handling

When querying datetime values on JSON fields using JSON query syntax, always set `is_datetime: true` to ensure the query is parsed as a date.

```sql
SELECT id FROM mock_items WHERE mock_items @@@ '{
    "range": {
        "field": "metadata.attributes.tstz",
        "lower_bound": {"included": "2023-05-01T08:12:34Z"},
        "upper_bound": null,
        "is_datetime": true
    }
}'::jsonb
ORDER BY id;
```
