title: Parse JSON Error: Javascript
body: <p>Am trying to parse this string using <code>JSON.parse</code>.</p>
  
  <p><strong>Ex.</strong></p>
  
  <pre><code>str = "{'xyz': ['300543979001'], 'abc': ['1193'], 'serial_no': ['1'], 'product_tax_amt': ['408.813'], 'product_mrp': ['4699.0'], 'product_qty': ['1.0'], 'contract_type': ['FG'], 'product_tax_rate': ['14.5'], 'is_vat_exclusive': ['True'], 'product_net_amt': ['3228.213'], 'sap_details': [''], 'reference_invoice_no': [''], 'pd': [\"1||9911143976001||18373205-L-I-F-T- RACER WN'S, PINK, 5||11143976||PUMA-18373205-L-I-F-T- RACER WN'S, PINK, 5-5||4699.0||291||629||1||2||41\"], 'topup_offers': ['{}'], 'product_discount_percentage': ['40.0'], 'total_discount_percentage': ['40.0'], 'basic_tax_rate': ['0.0'], 'total_discount_amt': ['1879.6'], 'product_return_qty': ['0.0'], 'product_gross_amt': ['0.0'], 'invoice_no': ['11065011391'], 'product_discount_amt': ['1879.6'], 'is_voided': ['False'], 'supplier_no': ['198'], 'addl_tax_rate': ['0.0'], 'product_cost_amt': ['1.0'], 'code': ['4046643889059']}"
  </code></pre>
  
  <p><strong>Note:</strong>: This is in single quoted &amp; few values might contains quotes also, like <code>[\"1||9911143976001||18373205-L-I-F-T- RACER WN'S, PINK, 5||11143976||PUMA-18373205-L-I-F-T- RACER WN'S, PINK, 5-5||4699.0||291||629||1||2||41\"]</code></p>
  
  <pre><code>&gt;&gt; JSON.parse(str)
  </code></pre>
  
  <p>But its throwing error: <code>Unexpected token '</code></p>
  
  <p><strong>EDITED</strong></p>
  
  <p>I tried few here and there things to replace these single quotes with double quotes,</p>
  
  <pre><code>&gt;&gt; str = str.replace(/'/g, '"')
  &gt;&gt; JSON.parse(str)
  </code></pre>
  
  <p>But then it raises error,</p>
  
  <pre><code>SyntaxError: Unexpected token S
  </code></pre>
  
  <p>Is there any way using <code>regex</code> or something, so i could parse that string?</p>