title: Javascript get Object inside Object
body: <p>I took a php array with double arguments (that has like ['contact']['en'] or ['contact']['fr'] or ['presentation']['en']) and did a json_encode to have its values in javascript (so I can use it for ajax)</p>
  
  <p>when I do alert(JSON.stringify(myvariable, null, 4));
  I get something like :</p>
  
  <pre><code>{
      "contact":{
          "fr":"value",
          "en":"value2",
          "es":"value3"
          },
      "presentation":{
          "fr":"value",
          "en":"value2"
          },
          etc...
  }
  </code></pre>
  
  <p>What I want to do is to check if a value is equal to the first object (ex: contact=contact) then do a loop for that gets all the values when the condition is met. So if contact = contact, then get me the value of fr,en and es in contact.
  I managed to do the first object with: </p>
  
  <pre><code>for (var k in variable){
      if(k ==  valuechecked)
          {
  
          }                           
      }
  </code></pre>
  
  <p>But when I do inside  if(k ==  valuechecked):</p>
  
  <pre><code>    for (var a in k){
          alert(a);
      }
  </code></pre>
  
  <p>It shows numbers from 0 up to I believe the amount of k there is (therefore the first object).
  I managed to do what I want with php but not with javascript ... How do I get the values of the objects inside the validated object?</p>