function formatComparisonItems(obj) {
  const isMultiRegion = obj.geo && Array.isArray(obj.geo);
  let isMultiKeyword = Array.isArray(obj.keyword);

  // Duplicate keywords to match the length of geo
  if (isMultiRegion && !isMultiKeyword) {
    obj.keyword = Array(obj.geo.length).fill(obj.keyword);
    isMultiKeyword = true;
  }

  // If we are requesting an array of keywords for comparison
  if (isMultiKeyword) {

    // Map the keywords to the items array
    let items = obj.keyword.reduce((arr, keyword) => {
      // Add the keyword to the array
      arr.push({ ...obj, keyword });

      return arr;
    }, []);

    // Is there an array of regions as well?
    if (isMultiRegion) {

      obj.geo.forEach((region, index) => {
        items[index].geo = region;
      });
    }

    return items;
  }

  return [obj];
}
Create the array of comparisonItems to be used
@param  {Object} obj The query obj with .keyword property and optionally
                     the .geo property
@return {Array}     Returns an array of comparisonItems