Hi all,
Sorry if the title is a it confusing. I have a query:
if (date === "Monday") {
wixData.query("vetOffices")
.eq("title", v)
.find()
.then( (results) => {
let r = results.items[0];
let t = r.monday
let o = r.mondayOpen;
let c = r.mondayClose;
let a = r.appointmentLength;
if (t === "CLOSED") {
console.log('search end')
} else {
wixData.query("30")
.eq("time", o)
.find()
.then( (findings) => {
let f = findings.items[0]
var n = f.value;
console.log(n);
session.setItem("open", n)
})
wixData.query("30")
.eq("time", c)
.find()
.then( (findings) => {
let f = findings.items[0]
var n = f.value;
console.log(n)
session.setItem("close", n)
})
let op = parseInt(session.getItem("open"), 10);
let cl = parseInt(session.getItem("close"), 10);
console.log(op)
console.log(cl)
wixData.query("30")
.between("value", op, cl)
.find()
.then( (end) => {
let e = end.items;
console.log(e)
})
}
})
}
It works perfectly and calls all of the results in database 30 for me. But, I need to make an array that consists of ALL of the results in a SINGLE column of the results at the end. I tried:
let tms = e.display;
But it doesn’t work. Is there any way to refer to the single column without having to go end.items[0] end.items[1] etc.?
Thanks in advance!