function getColumns (list) {
	return list.uiElements.map((col) => {
		if (col.type === 'heading') {
			return { type: 'heading', content: col.content };
		} else {
			var field = list.fields[col.field];
			return field ? { type: 'field', field: field, title: field.label, path: field.path } : null;
		}
	}).filter(truthy);
}
Get the columns of a list, structured by fields and headings

@param  {Object} list The list we want the columns of

@return {Array}       The columns