The issue is not async/await, your res is a Promise, and the length will always be undefined. For example:
res
var p = Promise.resolve([1,2,3]); console.log(p.length) // undefined
2.1m questions
2.1m answers
60 comments
57.0k users