title: Need help converting json to a particular format
body: <p>I need some help with converting my json to an exact format, Ive tried the following below</p>
  
  <pre><code>var WhConns = [{"ConnectTo":"WormID2","UID":"WormID7","Cmass":"'#0000FF'","Cmass1":"'#0000FF|4'"},{"ConnectTo":"WormID7","UID":"WormID8","Cmass":"'#0000FF'","Cmass1":"'#0000FF|4'"},{"ConnectTo":"WormID8","UID":"WormID9","Cmass":"'#0000FF'","Cmass1":"'#0000FF|4'"}];
  
  
  for (var i=0; i&lt;WhConns.length; i++) {
   r.connection(WhConns[i].ConnectTo, WhConns[i].UID, WhConns[i].Cmass, WhConns[i].Cmass1);
  }
  </code></pre>
  
  <p>but it doesnt work and iam not sure how to output it as below.</p>
  
  <pre><code> r.connection(WormID7, WormID8, '#0000FF', '#0000FF|4');
  </code></pre>
  
  <p>If i put it out as document.write it will show the values, but Iam sort of at a dead end, so any help would be greatly appreciate and why it isnt working as above - so I can learn the errors of my way.</p>