I've created a method that looks like this:
public String getUTResult() throws IOException {
BuildResultParser bp = new BuildResultParser();
BuildResultBean b = bp.getreadFile("C:\\bc.txt");
String str = b.getuTresult();
return str;
The value stored in the str
variable is now: [0,5,5]
My goal is to pass this value to an ajax call in JavaScript in the following format:
unittest
{
fail:0
pass:5
total:5
}
In JavaScript, I actually need this data in array format so that I can access each value and perform some operations on it.