-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
- When I mango query, the results are returned in response.data.docs.
- When I doc query, the doc are returned in response.data.doc.
- When I view query, the results are returned in response.data.rows.
They are all docs.
Furthermore, for mango and view, I need to check the length to find out if there were any results.
if (response.data.rows.length > 0){
response.data.rows.forEach(row=>{})
}
I would like to simply code this (in all cases):
if (response.hasDocs(){
response.getDocs().forEach(doc=>{});
}
or even better
response.getDocs().forEach(doc=>{});
or even better
response.forEachDoc(doc=>{})
Any thoughts on shoving a forEachDoc interface into the response object before calling resolve on the promise?
Metadata
Metadata
Assignees
Labels
No labels