appsmith
appsmith copied to clipboard
[Bug]: Rest API: smart JSON substitution failure when escaping double quote from in return value from JS object
Is there an existing issue for this?
- [X] I have searched the existing issues
Description
From community:
JS function:
jbItemsToHalo: () => {
let rooms = jbGetProjectRooms.data.map(
(room,idx) => {return{"name": room.name,"item_id": 1,"isgroupdesc": true, "group_id":idx + 1} }
);
let items = jbGetProjectItems.data.line_items.map(
item => {
let group = rooms.filter(r => r.name == item.room.name)[0].group_id;
return{"name": item.short_description,"item_id": 1,"isgroupdesc": false, "group_id":group}
}
)
return rooms.concat(items)
}
This returns an array of JSON objects that get inserted into the body of a POST request. It fails when one of the JSON objects contain a double-qoute within a string, and Smart JSON Substitution is on, but it works when it is off.

Steps To Reproduce
As given in description.
Public Sample App
No response
Version
cloud