title: dynamically create sub arrays
body: <p>I have below mentioned array. these array values are from Database:</p>
  
  <p>If  the loop finds APP string, then it should add remaining field (including APP value ) to new array. How to do it.. Help plz </p>
  
  <pre><code>var applications=new Array("App", "sub", "child", "App1", "sub1", "sub0", "child1", "App2", "sub2", "child2"); 
  </code></pre>