Returns an array of formatted data
@param {Object} props: the props object
@returns {Array} an array of data
function getData(props) {
  return props.data ? formatData(props.data, props) : formatData(generateData(props), props);
}