index.js
// This function merges the datasets to 1 dataset
This function merges the datasets to 1 dataset
This function merges the datasets to 1 dataset
async function mergeData() {
  const result = await sharedIds(endpoints[0], endpoints[1], sharedKey);
  let dataA = result.resultA.filter(x => result.sharedIds.includes(x.areaid));
  let dataB = result.resultB.filter(x => result.sharedIds.includes(x.areaid));
  return filterData([dataA, dataB], keys);
}
async function mergeData ( ) { const result = await sharedIds ( endpoints [ 0 ] , endpoints [ 1 ] , sharedKey ) ; let dataA = result . resultA . filter ( x => result . sharedIds . includes ( x . areaid ) ) ; let dataB = result . resultB . filter ( x => result . sharedIds . includes ( x . areaid ) ) ; return filterData ( [ dataA , dataB ] , keys ) ; }
This function merges the datasets to 1 dataset
This function merges the datasets to 1 dataset