code: function flattenCatalog(items) {
    return items.reduce(function(soFar, item) {
      soFar.push(item);
  
      if (item.items) {
        soFar = soFar.concat(flattenCatalog(item.items));
        item.items = undefined;
      }
  
      return soFar;
    }, []);
  }
docs: Takes the hierarchy of serialized catalog members returned by {@link serializeToJson} and flattens it into an Array.
  @returns {Array}