I retrieve data from a collection. But if the Information retrieved from the collection equals a value I want it to do something
title is the field name in the collection. How can I use the field name in an IF Condition?
export function dropdown2_change_1(event, $w) {
$w(‘#columnStrip2’).hide()
wixData.query(‘Documents’)
.eq(‘applicationText’, $w(“#dropdown2”).value)
.find()
.valueOf()
.then(res => {
if (title === ‘1000’) {
wixLocation.to(‘url’)
} else {
$w(‘#text20’).show();
$w(‘#table2’).rows = res.items;
$w(‘#table2’).show();
}
});
}