0

Using Riak, how can I get the ID of the current item that's being processed in a Javascript map function?

function(v, kd, arg) {
    var element = v.values[0];
    var id = "??"; // How to get the ID of the current item
    return [id];
}
Mark
  • 67,098
  • 47
  • 117
  • 162

1 Answers1

0

I've discovered how to do it:

function(v, kd, arg) {
    return [v.key];
}

I've found the source on: http://contrib.basho.com/get_keys.html

Mark
  • 67,098
  • 47
  • 117
  • 162