Hey,
I have a problem, not sure if this is the right place for this, but
maybe someone knows.
So I have a variable like this:
var listofthings=[{
'y': 43,
'x': 32,
'name': ['E-GEOD-6280','E-MEXP-167','E-MEXP-167','E-MEXP-167'],
'fillColor': 'rgba(0,0,255,0.3)'
}, {
'y': 653,
'x': 1196,
'name': ['E-MEXP-167'],
'fillColor': 'rgba(0,0,255,0.3)'
}, {
'y': 152,
'x': 324,
'name': ['E-GEOD-23058','E-MEXP-167','E-MEXP-167'],
'fillColor': 'rgba(0,0,255,0.3)'
}];
And to use this in Highcharts JS I'm doing this:
var processed_json = new Array();
$.map(listofthings, function (obj, i) {
processed_json.push({
x: obj.x,
y: obj.y,
name: obj.name,
fillColor: obj.fillColor
});
});
For every 'name' list I would like to add a space before the
name like this:
{
'y': 152,
'x': 324,
'name': [' E-GEOD-23058','
E-MEXP-167',' E-MEXP-167'],
'fillColor': 'rgba(0,0,255,0.3)'}
How can I access the list of strings to do that??
All the best,
L.