lib/RestListMetadata.js
function groupFieldsByType(list){
    var fields = {};
    _.each(list.fields, function(v,k) {
        if (! fields.hasOwnProperty(v.type)) fields[v.type] = [];
        fields[v.type].push(v);
    });
    return fields;
}
function groupFieldsByType(list){
    var fields = {};
    _.each(list.fields, function(v,k) {
        if (! fields.hasOwnProperty(v.type)) fields[v.type] = [];
        fields[v.type].push(v);
    });
    return fields;
}
function groupFieldsByType ( list ) { var fields = { } ; _ . each ( list . fields , function ( v , k ) { if ( ! fields . hasOwnProperty ( v . type ) ) fields [ v . type ] = [ ] ; fields [ v . type ] . push ( v ) ; } ) ; return fields ; }
Groups all fields in a list by type.
@param list
@returns {{}} An object map of type/fields.
Groups all fields in a list by type .