How to string to object

Hi my dear friends;
Unfortunately I use an http request for one API source that return bad output. (it returns “string” instead of “object” to “settings” item)
Can anyone help me how can I turn settings output from string to object with “code Node”?


"settings":"{ "clients": [ { "password": "1A2b3C", "name": "abcd" } ]}",


Hi @mooghermez

You can use JSON.parse(string) to parse it.
In an expression this would be {{ JSON.parse(string) }}
However this bit of data you shared is not valid JSON.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.