define(function(require) { return function($){
	//支持obj[0].param，obj[1].param这样的格式
	$.extend($.jgrid, {
	       getAccessor : function(obj, expr) {
	           var ret, p, prm = [], i;
	           if (typeof expr === 'function') {
	              return expr(obj);
	           }
	           ret = obj[expr];
	           if (ret === undefined) {
	              try {
	                  if (typeof expr === 'string') {
	                     prm = expr.split('.');
	                  }
	                  i = prm.length;
	                  if (i) {
	                     ret = obj;
	                     while (ret && i--) {
	                         p = prm.shift();
	                         matchResult = p.match(/\[(\d+)\]/);
	                         if (matchResult) {
	                            var index = matchResult[1];
	                            clearResult = p.split('[')[0];
	                            ret = ret[clearResult];
	                            ret = ret[index];
	                         } else {
	                            ret = ret[p];
	                         }
	                     }
	                  }
	              } catch (e) {
	              }
	           }
	           return ret;
	       }
	    });
}});