Skip to content

Instantly share code, notes, and snippets.

@northamerican
Last active July 24, 2017 23:55
Show Gist options
  • Save northamerican/eba1656339c875f93f6e706f2dada616 to your computer and use it in GitHub Desktop.
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
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