I have a AQL query and the query works fine. Instead of printing out the result in the console. How can I get the value(result) of this query into a function ?
1.I hope this question is not too vague
example query
db.query(aqlQuery `
LET startVertex = (FOR doc IN spec
FILTER doc.serial_no == '"123456abcde"'
LIMIT 2
RETURN doc
)[0]
FOR v IN 1 ANY startVertex belongs_to
RETURN v.ip`, {
bindVar1: 'value',
bindVar2: 'value',
}).then(function(res) {
console.log("doc" + res._result);
})
console output :
- doc,192.168.72.237