title: JSON data partially cannot be changed
body: <p>I'm stuck with this small piece of code that isn't supposed to be complicated, this small piece of JSON data cannot be changed unlike everything else. </p>
  
  <p>Original JSON data:
  <strong>apptData.push({
          'service': serviceName,
          'duration': rawDuration,
          'tech' : selectedTech
      })</strong></p>
  
  <p>I wanted to consolidate it into: <strong>finalApptData</strong> in <strong>findTimeSlots()</strong></p>
  
  <p>The small piece of data I want to change is: <strong>finalApptDatap[j].service</strong> to hold more info but it would not be changed when viewed using console.log()</p>
  
  <p>I use <strong>console.log(finalApptData);</strong> at the end of everything to check.</p>
  
  <pre><code>var apptData = [];
  function addApptData(serviceName, rawDuration, selectedTech){
      apptData.push({
          'service': serviceName,
          'duration': rawDuration,
          'tech' : selectedTech
      })
  }
  function reduceApptData(index){
      apptData.splice(index, 1);
  }
  function findTimeSlots(dateStr){
      var finalApptData = [];
      for(var i = 0; i &lt; apptData.length; i++){
          var duplicated = false;
          for(var j = 0; j &lt; finalApptData.length; j++){
              if(finalApptData[j].tech == apptData[i].tech){
  
  //All those line changing finalApptData[j].service are from multiple attempts. 
  // I must have done something wrong but I'm not sure where.
  
                      **finalApptData[j].service = "changed";
                      finalApptData[j].service.push("apptData[i].service");
                      finalApptData[j].service.push(apptData[i].service);
                      finalApptData[j].service += apptData[i].service;
                      finalApptData[j].service += ", "+apptData[i].service;**
  
                  finalApptData[j].duration += apptData[i].duration;
                  duplicated = true;
              }
          }
          if(!duplicated){
              finalApptData.push(apptData[i]);
          }
      }
      console.log(finalApptData);
      $.post('./getTimeSlots.php', {'date': dateStr}, function(response){
          console.log("Response: "+response);
      });
  }
  </code></pre>