# JSON Escape

**URL:** https://connective.celigo.com/t/json-escape/69
**Category:** Integrator.io
**Tags:** http, json, javascript
**Created:** [July 25, 2024, 8:04pm UTC](https://connective.celigo.com/t/json-escape/69 "2024-07-25T20:04:19Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![joseph](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@joseph](https://connective.celigo.com/u/joseph)
#### Post date: [July 25, 2024, 8:04pm UTC](https://connective.celigo.com/t/json-escape/69/1 "2024-07-25T20:04:19Z")

</div>

Hi, I am having an issue escaping quotes. I've tried regexReplace with no solution.

[https://connective.celigo.com/t/faq-can-i-escape-double-quotes-from-a-string-passed-to-the-http-request-body/1466](https://connective.celigo.com/t/faq-can-i-escape-double-quotes-from-a-string-passed-to-the-http-request-body/1466)

Ex txt: Dimensions: "about\_this\_item": 27\" W x 24 1/2\" L  
Weight: 20lbs ",

"value": "{{{regexReplace record.data.attributes.about\_this\_item "\'" "[\']"}}}

---

<div class="post-metadata">

### Author: ![tylerlamparter](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/tylerlamparter/32/9204_2.png) [@tylerlamparter](https://connective.celigo.com/u/tylerlamparter)
#### Post date: [July 29, 2024, 5:28pm UTC](https://connective.celigo.com/t/json-escape/69/2 "2024-07-29T17:28:56Z")

</div>

@joseph I'm a bit confused what you're trying to do. What input data do you have an what is your desired output? Quote are automatically escaped because if they aren't, then it wouldn't be valid JSON.

---

<div class="post-metadata">

### Author: ![joseph](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@joseph](https://connective.celigo.com/u/joseph)
#### Post date: [July 31, 2024, 3:20pm UTC](https://connective.celigo.com/t/json-escape/69/3 "2024-07-31T15:20:35Z")

</div>

@tylerlamparter

Sorry, I should have explained that better. I'm having issues escaping double quotes.

 ![5301043caa20740200000001-6d40a88af2ff4180b807e2a0f5716c0f.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/6/628fae20d6eb9164d179a43b3bf8c16ea274aecf.png)

I tried regex replace: “{{regexReplace record.data.[0].attributes.about\_this\_item ‘’ ‘"’}}” but this returns an error:

An invalid JSON is sent in the request.body, error: please ensure that you have wrapped all JSON property names in quotes. details: Unexpected token \< in JSON at position 1377

 ![5301043caa20740200000001-702d1d5f1e1e4f0fb636efee9642c381.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/7/76e664f979cf85dc11cbf1b7009eff217d760eca.png)

---

<div class="post-metadata">

### Author: ![tylerlamparter](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/tylerlamparter/32/9204_2.png) [@tylerlamparter](https://connective.celigo.com/u/tylerlamparter)
#### Post date: [July 31, 2024, 4:15pm UTC](https://connective.celigo.com/t/json-escape/69/4 "2024-07-31T16:15:46Z")

</div>

@joseph I see, so you want to completely remove double quotes from your html field, correct? Then it looks like it is doing that in the AFE editor output, but then fails when you actually run it?

---

<div class="post-metadata">

### Author: ![joseph](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@joseph](https://connective.celigo.com/u/joseph)
#### Post date: [July 31, 2024, 4:34pm UTC](https://connective.celigo.com/t/json-escape/69/5 "2024-07-31T16:34:40Z")

</div>

@tylerlamparter

Correct. I initially wanted to find a way to keep the double quotes and after multiple unsuccessful attempts I decided to remove the double quotes with regex replace but I'm unable to do that also. In the editor, it removes the double quotes once I run the flow it returns this error.

 ![5301043caa20740200000001-02bb33e74cee4d4bafe5e7c93d1a596c.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/5/5d4ffff3dabb3d02b6046367c035a3c87daddbc9.png)

---

<div class="post-metadata">

### Author: ![tylerlamparter](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/tylerlamparter/32/9204_2.png) [@tylerlamparter](https://connective.celigo.com/u/tylerlamparter)
#### Post date: [July 31, 2024, 4:49pm UTC](https://connective.celigo.com/t/json-escape/69/6 "2024-07-31T16:49:53Z")

</div>

@joseph your handlebar is working for me. Are you sure the issue is with this field and not with another field or other part with your JSON output?

 ![5301043caa20740200000001-c8cdcdca5cd9430f89daa901a403aacd.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/4/41dd921b692bd8d63bbaf87d5ff5e0fb9df097cd.png)

 ![5301043caa20740200000001-5a90c185e63c4320ad5ebdcf238c54b5.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/3/3bd3d140488213a2140e05b5f50c62ef7e5e3cba.png)
