function populateList(firebase, list, p, results) {
  // Handle root not being defined
  if (!results[p.root]) {
    set(results, p.root, {})
  }
  return Promise.all(
    map(list, (id, childKey) => {
      // handle list of keys
      const populateKey = id === true || p.populateByKey ? childKey : id
      return getPopulateChild(firebase, p, populateKey).then((pc) => {
        if (pc) {
          // write child to result object under root name if it is found
          return set(results, `${p.root}.${populateKey}`, pc)
        }
        return results
      })
    })
  )
}
@private
@param {object} firebase - Internal firebase object
@param {object} list - Object to have parameter populated
@param {object} p - Object containing populate information
@param {object} results - Object containing results of population from other populates
@returns {Promise} Resovles with populated list