Reputation: 21
I'm trying to get the value of a column from a ScriptDb
database for a column called "Cust Name" - if it was CustName or similar I could do the following:
while(result.hasnext()){
res = result.next();
var CustName = res.CustName;
}
How you I get the value if the column is called "Cust Name"?
Upvotes: 1
Views: 202
Reputation: 37269
Instead of accessing it as a with dot notation, you could try this:
while(result.hasnext()){
res = result.next();
var CustName = res["Cust Name"];
}
I tested this using a spreadsheet (since that is one way you can get a property with a space loaded), and it returned the correct value for a column with a space.
Upvotes: 1