title: how to get the value 'dynamically' from an associative array in javascript?
body: <p>i am trying to get a value from a key stored on a string variable proyNombre, but whenever i call it via the common method "myAssociativeArray.MyKey", it gets the variable 'proyNombre' as the key, instead of getting its value and passing it as a key.        </p>
  
  <pre><code>proyectos.each(function(index){
      var proyNombre = this.value;
  
      if(!(proyNombre in myArray)){ // whenever the variable is undefined, define it
          myArray[proyNombre] = horas[index].value-0 + minutos[index].value/60;
      }
      else{
          console.log(myArray.proyNombre); //This doesnt work, it tries to give me the value for the key 'proyNombre' instead of looking for the proyNombre variable
          console.log(myArray.this.value); //doesnt work either
      }
  
  });
  </code></pre>