src/components/meta/Base.js
function self(collector, container, level, fields, reverse) {
            fields = [].concat(fields || []);

            _.each(container, function(value, name) {
                if (fields[0] && (name !== fields[0])) {
                    return;
                }

                if (level > 1 && _.isSimpleObject(value)) {
                    if (!(name in collector)) {
                        collector[name] = {};
                    }
                    self(collector[name], value, level-1, fields.slice(1));
                } else if (reverse || (!(name in collector))) {
                    collector[name] = value;
                }
            });

            return collector;
        }
function self(collector, container, level, fields, reverse) {
            fields = [].concat(fields || []);

            _.each(container, function(value, name) {
                if (fields[0] && (name !== fields[0])) {
                    return;
                }

                if (level > 1 && _.isSimpleObject(value)) {
                    if (!(name in collector)) {
                        collector[name] = {};
                    }
                    self(collector[name], value, level-1, fields.slice(1));
                } else if (reverse || (!(name in collector))) {
                    collector[name] = value;
                }
            });

            return collector;
        }
function self ( collector , container , level , fields , reverse ) { fields = [ ] . concat ( fields || [ ] ) ; _ . each ( container , function ( value , name ) { if ( fields [ 0 ] && ( name !== fields [ 0 ] ) ) { return ; } if ( level > 1 && _ . isSimpleObject ( value ) ) { if ( ! ( name in collector ) ) { collector [ name ] = { } ; } self ( collector [ name ] , value , level - 1 , fields . slice ( 1 ) ) ; } else if ( reverse || ( ! ( name in collector ) ) ) { collector [ name ] = value ; } } ) ; return collector ; }
Collect values to specified collector

@param {object}  collector Collected values will be added to it
@param {object}  container Searched for specified fields
@param {number}  level     Lever of property search depth
@param {array}   fields    Searching
@param {boolean} reverse   If true overwrite collector property value

@returns {object} Collector

@this {clazz|object}
Collect values to specified collector