Skip to content

Instantly share code, notes, and snippets.

@elliotlarson
Last active July 22, 2018 04:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elliotlarson/67170d8110db581c2c0f1a8e7585298b to your computer and use it in GitHub Desktop.
Save elliotlarson/67170d8110db581c2c0f1a8e7585298b to your computer and use it in GitHub Desktop.
const newCharacters = Object.keys(characters).reduce((obj, id) => {
if (id !== `${deleteId}`) {
return { ...obj, [id]: characters[id] };
}
return obj;
}, {});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment