I have managed to create below string and pass it to jsp
"Dataset1:[ 10,22,33,44,55,66,7 ],Dataset2:[ 20,12,43,24,55,26,47 ],Dataset3:[ 30,12,53,64,5,16,77 ],Dataset4:[4 0,12,63,64,5,6,44 ]"
My chart function accepts data as js object described below
var graph_dataset = {
"Dataset1":[10,22,33,44,55,66,7 ]
,"Dataset2":[20,12,43,24,55,26,47 ]
,"Dataset3":[30,12,53,64,5,16,77 ]
,"Dataset4":[40,12,63,64,5,6,44 ]
};
so that I should be able to get my array (value corresponding to each key) if I call it by graph_dataset.Dataset4.
I have tried lot of things by hit and trail including JSON.parse. Please help with a piece of code