Last active
July 24, 2017 23:55
-
-
Save northamerican/eba1656339c875f93f6e706f2dada616 to your computer and use it in GitHub Desktop.
get all values inside an object or array recursively as a string for search matching or filtering
This file contains hidden or 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
const objValuesAsString = obj => { | |
return obj instanceof Object ? Object.values(obj).map(objValuesAsString).join(' ') : obj; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment