title: Javascript changing value in multidimensional array
body: <p>I try to to fill a multidimensional Array with the content from an Json file. </p>
  
  <p>The problem is, I can´t update the content in the Array:</p>
  
  <pre><code>if(j&gt;i &amp;&amp; hoursYy == hoursY &amp;&amp; secondsX == secondsXx){
    wocheArray[i].count = wocheArray[i].count + 1;
  }
  </code></pre>
  
  <p>My goal was, that "count" counts up, every time I find a duplicate in my JSON file. I couldn't´t find an answer online jet. </p>
  
  <p>just in case, here is the whole code:</p>
  
  <pre><code>var myweek;
  var x;
  var y;
  var id;
  var count;
  var wocheArray = [];
  
  function preload(){
  myweek = loadJSON("data/data.json");
  }
  
  function setup(){
  createCanvas(windowWidth, windowHeight);
  background(0);
  
  //SAVE IN WOCHEARRAY
  for (var i = 0; i &lt; myweek.woche.length; i++) {
  
  hoursY = myweek.woche[i].stunden;
  secondsX = myweek.woche[i].sekunden;
  
  for (var j=0; j&lt; myweek.woche.length; j++){
   hoursYy = myweek.woche[j].stunden;
   secondsXx = myweek.woche[j].sekunden;
  
  if(j&gt;i &amp;&amp; hoursYy == hoursY &amp;&amp; secondsX == secondsXx){
    wocheArray[i].count = wocheArray[i].count + 1;
  }
  
  else {
    x = myweek.woche[i].stunden;
    y = myweek.woche[i].sekunden;
    id = myweek.woche[i].person;
    count = 0;
    }
  wocheArray[i] = {x, y, count, id};
  }
  }
  console.log(wocheArray);
  }
  </code></pre>