title: Incorporating array into forloop // same pattern
body: <p>I need some quick help on how to incorporate my array into a forloop.</p>
  
  <p>I currently have a graph that takes in this as nodes:</p>
  
  <pre><code>var classes = [
      {"name":"test.cluster1.item1"},
      {"name":"test.cluster1.item2"},
      {"name":"test.cluster1.item3"}
  ];
  </code></pre>
  
  <p>I have a separate working array called fileArray which I have several nodes I would like to incorporate into my graph</p>
  
  <pre><code>var fileArray = ["a", "b", "c", "etc..."];
  </code></pre>
  
  <p>I'm trying to replace all the "test cluster items" in my data with every element of fileArray, how could I do this?</p>
  
  <p>Currently I have this and it makes no sense, I know, but have no idea how to approach this.</p>
  
  <pre><code>for(i = 0; i &lt; fileArray.length; i++) {
      var classes = [
          {"name": fileArray(i)}
      ];
  }
  </code></pre>
  
  <p>Desired result:</p>
  
  <pre><code>var classes = [
      {"name":"fileArray[0]"},
      {"name":"fileArray[1]"},
      {"name":"fileArray[2]"},
      {"name":"fileArray[3]"},
      {"name":"fileArray[4]"}
  ];
  </code></pre>
  
  <p>Thanks.</p>