title: Provide data to highcharts from a Java method
body: <p>I have a java method which retrieves data from database and a bean which manages this data.</p>
  
  <p>Using <strong>Arrays.toString(var)</strong>, I get this array <code>[{'tom','1'},{'sawyer','2'}]</code> but highcharts accept data only in this format <code>['tom','1','sawyer','2']</code></p>
  
  <p>For now I have to get the array and using replace function to get the correct format but all this has to be done manually.</p>
  
  <p>My question is how to convert the array to the correct format and then pass it to the highcharts data.</p>
  
  <ol>
  <li>How to load a Java method on page load?</li>
  </ol>
  
  <p>Thank you for your patience and help in advance.</p>