title: Need help to access data between json string and object using jquery
body: <p>I have a problem with jQuery to obtain each value from jSon string and modify a div or span or other id with value obtained from a jSon string.</p>
  
  <p>At the start of each PHP file i have an SQL request generate an hidden input with a jSon string as value. This is for multilanguage for example in english the generated string is </p>
  
  <pre><code>&lt;input type="hidden" id="page_json_language_home" value='{
         "label_title":"My WebSite",
         "label_settings":"Settings",
         "label_subscription":"Subscription"
         }' /&gt;
  </code></pre>
  
  <p>for french : </p>
  
  <pre><code>&lt;input type="hidden" id="page_json_language_home" value='{
         "label_title":"Mon site web",
         "label_settings":"Parametres",
         "label_subscription":"Abonnement"
         }' /&gt;
  </code></pre>
  
  <p>this is work fine !</p>
  
  <p>After that i have a javascript using jquery to match each label_xxx with value</p>
  
  <p>i have many html code like this </p>
  
  <pre><code>&lt;title id="label_title&gt;&lt;/title&gt;
  &lt;div id="label_settings"&gt;&lt;/div&gt; 
  </code></pre>
  
  <p>or </p>
  
  <pre><code>&lt;span id="label_subscription"&gt;&lt;/span&gt;
  </code></pre>
  
  <p>This is my (partial) code in my javascript file i called to obtain the json string from hidden input : </p>
  
  <pre><code>    var _getPageJsonLanguage = function(id) {
          if (!id)
              id = "page_json_language";
          else
              id = "page_json_language_" + id;
  
          var json = $("#" + id).val();
          var data = bsc.data.jsonParse(json);
          return data;
      };
  </code></pre>
  
  <p>This is work fine too !</p>
  
  <p>The code in problem is : </p>
  
  <pre><code>        data_language = bsc.page.getPageJsonLanguage("home");
  
          var j = 0;
          var language = [];
  
          for (i in data_language) {
              console.log("i in language = " + i);
              language[j] = i;
              console.log("language[j] = " + language[j]);
              $("#" + i).html(language[j]);
              j++;
          }
  </code></pre>
  
  <p>The result can i obtain in browser 1) undefined for each label or 2) label_xxx for each label_xxx
  I need help to access each value of each label_xxx .</p>
  
  <p>I can't obtain the value, this is my last try....</p>