code: function(value, sourceData, valueProp) {
             if(!sourceData || value === null) {
                 return [];
             }
             
             if (typeof(valueProp) !== "function") {
                 var idKey = valueProp || 'value';
                 valueProp = function (e) { return e[idKey]; };
             }
                        
             var isValArray = $.isArray(value),
             result = [], 
             that = this;
  
             $.each(sourceData, function(i, o) {
                 if(o.children) {
                     result = result.concat(that.itemsByValue(value, o.children, valueProp));
                 } else {
                     /*jslint eqeq: true*/
                     if(isValArray) {
                         if($.grep(value, function(v){  return v == (o && typeof o === 'object' ? valueProp(o) : o); }).length) {
                             result.push(o); 
                         }
                     } else {
                         var itemValue = (o && (typeof o === 'object')) ? valueProp(o) : o;
                         if(value == itemValue) {
                             result.push(o); 
                         }
                     }
                     /*jslint eqeq: false*/
                 }
             });
             
             return result;
         }
docs: /*
  returns array items from sourceData having value property equal or inArray of 'value'