Skip to content

Instantly share code, notes, and snippets.

@nicolasmendonca
Created July 7, 2019 14:57
Show Gist options
  • Save nicolasmendonca/d5cd5c53b1ac0c269f0c75189c19445d to your computer and use it in GitHub Desktop.
Save nicolasmendonca/d5cd5c53b1ac0c269f0c75189c19445d to your computer and use it in GitHub Desktop.
const response3 = [
{ purchaseId: 21, productName: 'Bag' },
{ purchaseId: 22, productName: 'Lamp' },
];
const requiredOutput3 = [
{ productId: 31, purchaseId: 21, product: { name: 'Bag' } },
{ productId: 32, purchaseId: 22, product: { name: 'Lamp' } },
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment