I have a JSON string that reads:
[{
\"id\": \"id2\",
\"index\": \"2\",
\"str\": \"str2\",
\"cent\": \"200\",
\"triplet\": \"222\"
},
{
Try this. I haven't tested it but should work.
var temp = //some json that I receive
var jsonForChart = jQuery.extend(true, {}, temp);
$.each(temp, function(key, value) {
$.each(value, function(k, v) {
if(!isNaN(parseInt(v))){
jsonForChart[key][k] = parseInt(v);
}else{
jsonForChart[key][k] = v;
}
});
});