fieldsToArray = fields => {
  let array = []

  for (let key in fields) {
    array.push({
      key,
      value: fields[key],
    })
  }

  return array
}
Converts a fields object into array so we can map though the array and follow DRY pattern.

@param {Object} fields Fields to convert into an array