code: 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;
  }
docs: Groups all fields in a list by type.
  @param list
  @returns {{}} An object map of type/fields.