title: Escape single quote in Postgres query inside node js app
body: <p>Here is a line from my node js code:</p>
  
  <pre><code>var qry = 'INSERT INTO "sma"."RMD"("UserId","Favourite")  VALUES (' + req.body.user + ',' + JSON.stringify(req.body.favourite) + ')'
  </code></pre>
  
  <p>I want to insert single quotes before <code>JSON.stringify(req.body.favourite)</code>. But i'm unable to escape the single quotes. I can't debug the issue since I'm uploading the code to a predix cloud server
  Any idea how to achieve that?</p>