Hi, I'm getting error when trying to pass dynamic variable into my select query:
const response = await sqlSELECT * FROM posts WHERE data->'topic' @> '[{"slug": "${slug}" }]';
Is there any way around this? I tried passing ${slug} without double quotes around it but then I get invalid json error.
Hi, I'm getting error when trying to pass dynamic variable into my select query:
const response = await sql
SELECT * FROM posts WHERE data->'topic' @> '[{"slug": "${slug}" }]';Is there any way around this? I tried passing ${slug} without double quotes around it but then I get invalid json error.