How to remove quotes from return value of a js

I want to remove the quotes from the return value,

From:

"(null, null, , 0, Defect is adjusted on the site, 1, Sharp Edge / Uneven Edge, , )"

To:

(null, null, , 0, Defect is adjusted on the site, 1, Sharp Edge / Uneven Edge, , )

I need to use that return value in sql for insertion.

Hey there!

I believe those quotes are there to indicate the return value is a string. For example, if I made a Javascript query that consisted of only return "Hello world", I'd get "Hello World" when I run the query. The right side of your screenshot removes these quotes, since that's how the console interprets a string.

In other words, as long as you were expecting a string returned, you're good to go! :grin:

2 Likes

Hi @khatanaashish,

Agreed with @emmulator :blush:

For your SQL query, could you share the resource type, screenshot of the query, & current error message?

In the meantime, this post might be helpful :crossed_fingers:

I didn't want to use the option of prepared statements. So, I switched back to traditional method.

Writing a general SQL statment and using JS with additionalScope to trigger it as required. Working Fine!