Last active
March 6, 2023 12:23
-
-
Save Git-I985/34fe877c25938a34286ff856823745fa to your computer and use it in GitHub Desktop.
Pick
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default (obj, keysArr) => { | |
return Object.fromEntries(Object.entries(obj).filter(([key]) => keysArr.includes(key))) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment