title: parse json response(JavaScriptSerializer) with double quotes using jquery
body: <p>I am using the following code in my aspx(asp.net MVC ViewPage) to get serialized output:</p>
  
  <pre><code>var _accountNames = '&lt;%= ViewData["AccountNames"] != null ? new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(ViewData["AccountNames"]) : null%&gt;';
  </code></pre>
  
  <p>This gives the following result:</p>
  
  <pre><code>[{"Name":"My Saving","AccountBalance":-4.2500,"ReferenceId":2},
  {"Name":"My Checking","AccountBalance":0.0000,"ReferenceId":3},
  {"Name":"Undeposited Funds","AccountBalance":113.6600,"ReferenceId":2},
  {"Name":"Star Account "Trust"","AccountBalance":0.0000,"ReferenceId":50}]
  </code></pre>
  
  <p>In the above result, the Account (Star Account "Trust") has double quotes in it. It gives <code>"missing } after property list"</code> error, while using eval. Even using JSON parse gives error.</p>
  
  <p>I am using this result to bind the dropdown options as:</p>
  
  <pre><code> var k = JSON.parse(_accountNames.replace(/'/g, '"'));
   if (k != null &amp;&amp; k.length &gt; 0) {
      var options = '';
      options += '&lt;option value=""&gt;' + "--Select Account--" + '&lt;/option&gt;';
      for (var i = 0; i &lt; k.length; i++) {
         options += '&lt;option value="' + k[i].AccountNameType + '"&gt;' + k[i].Name + ' $(' + k[i].AccountBalance + ')' + '&lt;/option&gt;';
      }
  }
  $("select#DepositToddl").html(options);
  </code></pre>
  
  <p>How can i parse the result has double quotes in it? Please suggest.</p>