diff --git a/lib/torque/provider/json.js b/lib/torque/provider/json.js index 68bebc2..e69c79c 100644 --- a/lib/torque/provider/json.js +++ b/lib/torque/provider/json.js @@ -121,8 +121,9 @@ var Profiler = require('../profiler'); var dates = row.dates__uint16; var val_keys = Object.keys(row).filter(function(k){return (k.indexOf("vals__uint8") > -1) }) var val_arr = [] + val_keys.forEach(function(key){ - var i = key.match(/vals__uint8_(\d+)/)[1] + var i = (key=='vals_uint8' ? 0 : key.match(/vals__uint8_(\d+)/)[1]) val_arr[i] = row[key]; }) @@ -499,7 +500,7 @@ var Profiler = require('../profiler'); "layers": [{ "type": "cartodb", "options": { - "cartocss_version": "2.1.1", + "cartocss_version": "2.1.1", "cartocss": "#layer {}", "sql": this.getSQL() }