Working with Mongoose Arrays synchronously via async
This question already has an answer here:
iterating over an array using
for(item in ['a', 'b']) {
console.log(item)
}
will give you the array indexes: 0, 1
You are looking for
for(const item of ['a', 'b']) {
console.log(item)
}
And that will print values: a, b
Check this
链接地址: http://www.djcxy.com/p/70032.html