---
title: JSON Functions
description: Standard library functions for JSON manipulation
---

## jq

The `jq` function allows slicing, filtering, and mapping JSON data. See the
[jq documentation](https://jqlang.github.io/jq/manual/) for more details.

### Inputs

| Name           | Type             | Description                                                                   |
| -------------- | ---------------- | ----------------------------------------------------------------------------- |
| `decoded_json` | string \| object | A JSON object                                                                 |
| `query`        | string           | A JSON query. See the [jq documentation](https://jqlang.github.io/jq/manual/) |

### Output

| Name    | Type          | Description                  |
| ------- | ------------- | ---------------------------- |
| `value` | array[string] | The result of the `jq` query |

```hcl
output "message" {
    value = jq("{ \"message\": \"Hello world!\" }", ".message")
}
// > message: Hello world!
```
