Hello,
i write a function to use select on my DB:
The Object.values dosent really work it sends: [[....]] so there is [ and ] to much to parse the elements. Also u get the ascii codes and not the String. Is it possible to fix this?
Sorry for my bad English...
i write a function to use select on my DB:
Code:
function dbQueryStatement(statement) {
if (dbc != null) {
var res = dbc.query(statement);
if (res[0] != null) {
if ((Object.values(res[0]).toString()) != "") {
var result = "";
((Object.values(res[0])).toString().replace("/\[\]/", "").split(",")).forEach(function(element) {
result += String.fromCharCode(element);
});
return result;
}
}
}
return null;
}
The Object.values dosent really work it sends: [[....]] so there is [ and ] to much to parse the elements. Also u get the ascii codes and not the String. Is it possible to fix this?
Sorry for my bad English...