I am running a code like:
db.items.group({
cond: {"id": {$in: [1,2,3]}},
initial: {},
reduce: function(item_data, out) { print(item_data.id + "," + item_data.price); }
});
I would like to have a CSV-formatted output of id,price pairs (for particular items). However, nothing is printed (except of an empty result of mapReduce). What is the right way to accomplish the mission?
1 Answer