0
使用Riak,如何獲取當前在Javascript地圖函數中處理的項目的ID?Riak - 如何在Map函數中獲取當前項目的ID
function(v, kd, arg) {
var element = v.values[0];
var id = "??"; // How to get the ID of the current item
return [id];
}
使用Riak,如何獲取當前在Javascript地圖函數中處理的項目的ID?Riak - 如何在Map函數中獲取當前項目的ID
function(v, kd, arg) {
var element = v.values[0];
var id = "??"; // How to get the ID of the current item
return [id];
}
你試過'this.id'或'element.id'? – Shmiddty 2013-03-14 18:57:52
'this.id'和'element.id'都返回'null' – Mark 2013-03-14 18:58:24