Open fraballi opened 4 years ago
Dear colleagues, I need to load input data with Ajax dynamically and JS handles string arrays double-quoted so the map can't select regions.
Tried this, but the output is not correct:
//Note: 'data' is a model loaded via Ajax as: {"MX": "15.65", ..., } var keys = Object.keys(data).map(function (key) { return "'" + key + "'"; // Want: ['MX'], but get [" 'MX' "] }); ... selectedRegions: keys.toString(),
Only setting static values works for me.
How can be done?
Dear colleagues, I need to load input data with Ajax dynamically and JS handles string arrays double-quoted so the map can't select regions.
Tried this, but the output is not correct:
Only setting static values works for me.
How can be done?