title: How to pass Json string as a javascript method parameter
body: <p>I formed a Json String.</p>
  
  <pre><code>var jsonProduct = "{Product:'" + Details[0] + "',Brand:'" + Details[1] + "',Model:'" + Details[2] + "',Price:'" + Details[3] + "'}"
  
  &lt;input class="button black" type="submit" value="Add To Cart" onclick="return addOrderItem(' + jsonProduct + ')" /&gt;
  </code></pre>
  
  <p>How to pass this 'jsonproduct to javascript function addOrderItem as follows</p>
  
  <pre><code>function addOrderItem(product)
  {
      cartproduct[cartproduct.length] =  " + product + ";
      //cartproduct[cartproduct.length] = " + {Product:'1001',Brand:Dell',Model:'Inspiron',Price:'25000'} + ";
  }
  </code></pre>
  
  <p>When I pass product as parameter it is not working</p>