index.js
function(key, done) {
      if(!this._key) {
        done('no key found for metadata');
        return;
      }
      var ret = null; // if not found return null
      for(var i = 0; i < this._data.length; i++) {
        if(this._data[i][this._key.getName()] === key) {
          ret = this._clone(this._data[i]);
          break;
        }
      }
      done(null, ret);
    }
function(key, done) {
      if(!this._key) {
        done('no key found for metadata');
        return;
      }
      var ret = null; // if not found return null
      for(var i = 0; i < this._data.length; i++) {
        if(this._data[i][this._key.getName()] === key) {
          ret = this._clone(this._data[i]);
          break;
        }
      }
      done(null, ret);
    }
function ( key , done ) { if ( ! this . _key ) { done ( 'no key found for metadata' ) ; return ; } var ret = null ; // if not found return null for ( var i = 0 ; i < this . _data . length ; i ++ ) { if ( this . _data [ i ] [ this . _key . getName ( ) ] === key ) { ret = this . _clone ( this . _data [ i ] ) ; break ; } } done ( null , ret ) ; }
return an item by id
@param  {String}   key  The key value
@param  {Function} done The callback when done
return an item by id