How to get corresponding value of key in JavaScript
<p>I have this code:</p>

<pre><code>var getValuesArray = [];
var setValuesArray = [];


function SetValueJson(key, value, scormVersion, methodCalled)
{
   if (key1 != null) {
     var obj = {
      key: key1,
     value: value1
   }
   setValuesArray.push(obj);
   alert("pushing the key as: " + setValuesArray[key] + " and value as: " + setValuesArray[key].value); //not shure how te reference it?
   return value;
}
</code></pre>

<p>and:</p>

<pre><code>function GetValueJson(key, scormVersion, methodCalled) {
   //I will get to this later, want to get the array right first

}
</code></pre>

<p>How do I reference the array?alert("pushing the key as: " + setValuesArray[key] + " and value as: " + setValuesArray[key].value); is not correct..</p>

<p>thanks</p>
