code: function hashToArray(hashObj, __key__ = "id") {
      if (hashObj && typeof hashObj !== "object") {
          throw new Error("Cant convert hash-to-array because hash was not passed in: " + hashObj);
      }
      const hash = Object.assign({}, hashObj);
      const results = [];
      const isHashArray = Object.keys(hash).every(i => hash[i] === true);
      const isHashValue = Object.keys(hash).every(i => typeof hash[i] !== "object");
      Object.keys(hash).map(id => {
          const obj = typeof hash[id] === "object"
              ? Object.assign({}, hash[id], { [__key__]: id }) : isHashArray
              ? id
              : { [__key__]: id, value: hash[id] };
          results.push(obj);
      });
      return results;
  }
docs: hashToArray
  
  Converts a hash data structure of {key: value, key2: value2} to an
  array of [ {id, value}, {id2, value2} ]. This should happen regardless
  to whether the values are themselves hashes (which they often are) or
  scalar values.
  
  The one edge case is where all the hashes passed in have a value of "true"
  which indicates that this really just a simple value based array encoded as
  a hash (as is often the case in Firebase for FK relationships).
  
  @param hashObj an object of keys that point to some data payload
  @param ___key__ the property name on the converted array-of-hashes which will contain the key value; by default this is "id"