# JSON\_EXTRACT\_ALL

```
JSON_EXTRACT_ALL (json_string,pattern)
```

Interprets ‘pattern’ as a Json path pattern and applies it to ‘json\_string’, returning all matches, as an array of strings containing valid json. Examples for the pattern parameter: “$.a”, “$\[‘a’]”, “$\[0]”, “$.points\[?(@\[‘id’]==‘i4’)].x”, “$\[‘points’]\[?(@\[‘y’] >= 3)].id”, “$.conditions\[?(@ == false)]”

Available in:

| Processors | SQL Studio |
| ---------- | ---------- |
| ✓          | ✓          |

*Sample code:*

```sql
USE `kafka`;
SELECT 
    JSON_EXTRACT_ALL(time_details, '$.*'), 
    time_details 
FROM credit-card-transactions
LIMIT 2;
```

*Output:*

{% code fullWidth="true" %}

```json
{
  "value": {
    "JSON_EXTRACT_ALL": [
      "1",
      "17",
      "15",
      "36"
    ],
    "time_details": "{\"hour\": 1, \"minute\": 17, \"second\": 15, \"millisecond\": 36}"
  }
}
{
  "value": {
    "JSON_EXTRACT_ALL": [
      "16",
      "23",
      "2",
      "255"
    ],
    "time_details": "{\"hour\": 16, \"minute\": 23, \"second\": 2, \"millisecond\": 255}"
  }
}
```

{% endcode %}
