# Parse text to JSON transform action

## Use case

You have received an API response of a JSON string instead of a JSON object and would like to convert it to a JSON object.

## Overview

<figure><img src="https://1835401289-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAQQ1EHVcEsGKBPVHmiav%2Fuploads%2FPIFB7H7e4L4odAaETH0K%2FScreenshot%202025-04-18%20at%203.05.44%E2%80%AFPM.png?alt=media&#x26;token=5ae98408-e2b4-4f81-8e6e-b76cd2ebc41c" alt="A screenshot of the parse test to JSON transform action, seen in the actions list menu of the workflow builder canvas."><figcaption></figcaption></figure>

Parse Text Data into JSON.

## Parameters

<table><thead><tr><th width="217">Parameter</th><th width="417.3333333333333">Description</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>String Contents</td><td>String to convert.</td><td>true</td></tr></tbody></table>

{% hint style="info" %}
You can utilize the Is JSON transform to test whether the string is valid JSON prior to parsing it with this transform.
{% endhint %}

## Usage

<details>

<summary>Example: Parsing a JSON String</summary>

Inputs:

**String Contents:**

```json
{"id":"676e061a-8004-4f60-ad37-cb0b2be25635","user":"Sean","age":32,"bio":"Hi, my name is Sean.\nI love hiking."}
```

</details>

## Results output

Result of Example:

```json
{
  "id": "676e061a-8004-4f60-ad37-cb0b2be25635",
  "user": "Sean",
  "age": 32,
  "bio": "Hi, my name is Sean.\nI love hiking."
}
```


---

# 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://docs.rewst.help/documentation/automations/actions-in-rewst/transform-actions/parse-text-to-json-transform-action.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.
