export const map: EntryPoints.MapReduce.map = ctx => {
  const valueObj: MapValueObj = JSON.parse(ctx.value);
  log.debug("Map Value", valueObj);

  const tranId = valueObj.internalid;
  delete valueObj.internalid;

  log.debug(`Key: ${tranId}`, `Value: ${JSON.stringify(valueObj)}`);
  ctx.write(tranId, JSON.stringify(valueObj));
};