Im very new to jquery but im using the following code:
var lineParts = [];
$.each( chartData, function(k,v){
barParts.push({
label: k,
value: v
});
});
How do I clip k to the first 3 characters of the string? For example I want Positive to become Pos. Ive tried using this but with no joy:
var lineParts = [];
$.each( chartData, function(k,v){
k = k.substring(0,3);
lineParts.push({
label: k,
value: v
});
});