Reputation: 8916
I Have 3 Records
"_id": "20"
,"_id": "30"
and "_id": "40"
.
How Can I Console.log _id
?
I want to Get This Output
20
30
40
Upvotes: 1
Views: 40
Reputation: 39
Found very easy solve of problem :
function(doc) {
if (doc.user && doc.title) { // This check is important
emit(doc.user, {id: doc._id});
}
}
Then query it :
GET /yourdb/_design/app/_view/by_user?key=film42
Upvotes: 2