Merge pull request #14 from CartoDB/filter-avoid-dot-notation

Avoid using dot notation to allow complex keys
pull/15/head
Raul Ochoa 9 years ago
commit 860bc0adeb

@ -92,7 +92,7 @@ tree.Filterset.prototype.toJS = function(env) {
val = filter._val.toString(true);
}
var attrs = "data";
return attrs + "." + filter.key.value + " " + op + " " + (val.is === 'string' ? "'" + val.toString().replace(/'/g, "\\'") + "'" : val);
return attrs + "['" + filter.key.value + "'] " + op + " " + (val.is === 'string' ? "'" + val.toString().replace(/'/g, "\\'") + "'" : val);
}).join(' && ');
};

Loading…
Cancel
Save