Pre-filling values of a form using json object
<p>I am using a JSON object something like this <code>{"expiry_year":"15","number":"411111","month":"12","cvn":"456"}</code></p>

<p>Now on some callback I am getting this value. My requirement is to put these values in a from by using MAP so in future if some one change DOM id it won't affect the page.</p>

<p>To achieve this I am trying like this </p>

<pre><code>var domWithValueMap = {
              "number" : "number",
              "cnv" : "cnv",
              "month" : "expiry_month",
              "expiry_year" : "expiry_year"
          }
</code></pre>

<p>In above hash </p>

<pre><code>var domWithValueMap = {
              "keys of json obg" : "id of DOM",

          }
</code></pre>

<p>and so on..</p>

<p>My div id's are : number,expiry_year,month and cvn.</p>

<p>Then after I was trying to match whether the keys are exists or not using this </p>

<pre><code>   domWithValueMap.hasOwnProperty(key);
</code></pre>

<p>After this I gets confused how to proceed. Please help me to achieve this.</p>
