function hydrateList(objects, property, targetObjects) {
  hydrate(objects, property, object =>
    (object[property] || [])
      .map(id => targetObjects[id])
      .filter(o => o != null),
  );
}
// replaces lists of ids with the actual objects
replaces lists of ids with the actual objects
replaces lists of ids with the actual objects
function hydrateList(objects, property, targetObjects) {
  hydrate(objects, property, object =>
    (object[property] || [])
      .map(id => targetObjects[id])
      .filter(o => o != null),
  );
}
function hydrateList ( objects , property , targetObjects ) { hydrate ( objects , property , object => ( object [ property ] || [ ] ) . map ( id => targetObjects [ id ] ) . filter ( o => o != null ) , ) ; }
replaces lists of ids with the actual objects
replaces lists of ids with the actual objects