title: Setting the value of a multidimensional object or array property in Javascript
body: <p>Yes I know how to loop through arrays (types) in <strong>Javascript</strong>. The fact is, I'd like to know how to set a <code>multiDimensionalArray</code> array's value by a set of given <code>indexes</code> to keep it as generic as possible. For example I've an array with a length of 3 (which could as well be a length of 4, 100, ...):</p>
  
  <p><code>var indexes = [0, "title", "value"];</code></p>
  
  <p>I know the multidimensional array (mArray) can be set by putting the indexes like so:</p>
  
  <p><code>multiDimensionalArray[0]["title"]["value"] = "Jeroen";</code> or <code>multiDimensionalArray[indexes[0]][indexes[1]][indexes[2]] = "Jeroen";</code></p>
  
  <p>The fact  that the given indexes array can vary and does not always contain the same index names so I'm search for a solution like this:</p>
  
  <p><code>multiDimensionalArray[indexes] = "Jeroen";</code></p>
  
  <p>I don't know how to code the assignation if this. I've searched on Google/Stack Overflow. Maybe I'm using the wrong keywords. Can anyone help me?</p>
  
  <p>Thanks!</p>