Enclose string values in double quotes

This commit is contained in:
jos 2018-07-02 22:09:40 +02:00
parent 066f5d37e6
commit fdbfa8a951
2 changed files with 9 additions and 3 deletions

View File

@ -175,10 +175,12 @@ function showTransformModal (node, container) {
function generateQueryFromWizard () {
if (filterField.value && filterRelation.value && filterValue.value) {
var field1 = filterField.value;
// TODO: move _stringCast into a static util function
var value1 = JSON.stringify(node._stringCast(filterValue.value));
query.value = '[? ' +
field1 + ' ' +
filterRelation.value + ' ' +
'`' + filterValue.value + '`' +
'`' + value1 + '`' +
']';
}
else {

View File

@ -60,14 +60,18 @@
object: { a: 2, b: 3}
};
for (var i = 0; i < 10000; i++) {
var longitude = 4 + i / 10000;
var latitude = 51 + i / 10000;
json.numbers.push(i);
json.array.push({
name: 'Item ' + i,
index: i,
time: new Date().toISOString(),
location: {
latitude: 51 + i / 10000,
longitude: 4 + i / 10000,
latitude,
longitude,
coordinates: [longitude, latitude]
},
random: Math.random()
});