Skip to content

Instantly share code, notes, and snippets.

@domitry
Created November 8, 2015 17:24
Show Gist options
  • Save domitry/d50377f8aca314af2809 to your computer and use it in GitHub Desktop.
Save domitry/d50377f8aca314af2809 to your computer and use it in GitHub Desktop.
var obj={a: 2, b: 3};
function get(key){
if(Array.isArray(key))return key.map(get);
return obj[key];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment