title: Need solution for the error 'Invalid JSON text: "Invalid escape character in string."' in nodejs when updating mysql record with object value
body: <pre><code>let sql: string = 'UPDATE  queryList SET ';
    const sqlUpdates: string[] = [];
    if (config &amp;&amp; config.queryId &amp;&amp; config.configJson) {        
      sqlUpdates.push(`configJson = '${JSON.stringify(config.configJson || {})}'`);
    }
    if (config &amp;&amp; config.queryId &amp;&amp; config.queryName) {
      sqlUpdates.push(`queryName = '${config.queryName}'`);
    }
    if (sqlUpdates &amp;&amp; sqlUpdates.length) {
      sql += sqlUpdates.join(',');
    }
  
    sql += `  WHERE queryId = '${config.queryId}'`;
    const [rows, fields] = await myDb.query(sql, []);
  </code></pre>
  <p>the above lines of code is in nodejs, trying to update the query. properties that sending from payload from ui is</p>
  <pre><code>  configJson: {filePath: &quot;D:\Users\AVenka22\slash&quot;}
    queryId: &quot;4b978290-b052-449c-81b5-0759e187db5e&quot;
    queryName: &quot;slashTest&quot; 
  </code></pre>
  <p>After execution i'm getting this error</p>
  <pre><code>  Invalid JSON text: \&quot;Invalid escape character in string.\&quot; at position 15 in value for column 'queryList.configJson'.
  </code></pre>