Skip to content

Instantly share code, notes, and snippets.

@ratul16
Last active April 6, 2022 05:47
Show Gist options
  • Save ratul16/45144b425c8d1cae62501175b453750a to your computer and use it in GitHub Desktop.
Save ratul16/45144b425c8d1cae62501175b453750a to your computer and use it in GitHub Desktop.
filter out selected keys from object
const formKeys = ['key1', 'key2', 'key3']
formKeys.forEach(key => {
this.testData[key] = mainData[key]
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment