# Escape JSON Field

> Escape a string to be used as a JSON field.

- ID: `escape_json_field`
- Type: Block
- Category: [Network](https://inventor.bot/docs/reference/blocks/network.md)

**Inputs**

| Name | Required | Description | Value |
| --- | --- | --- | --- |
| `string` | yes | String to escape. |  |

**Outputs**

| Name | Description | Value |
| --- | --- | --- |
| `escaped_string` | Escaped string safe for JSON fields. | e.g. `"\\\"hello\\\""` |

**Example**

```go
escapeJsonField := escape_json_field(Args{string: "..."})
send_text_message(Args{
	channel_id:      trigger.channel_id,
	message_content: "Escaped String: " + escapeJsonField.escaped_string,
})
```