Skip to content

Instantly share code, notes, and snippets.

@krishnasaga
Last active December 8, 2016 10:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krishnasaga/e87408c878b1f48c564d69eab618938b to your computer and use it in GitHub Desktop.
Save krishnasaga/e87408c878b1f48c564d69eab618938b to your computer and use it in GitHub Desktop.
JavaScript function for evolution object properties with '.' notation expression
var expressObject = function(object,string){
return string.split('.').reduce(function(a,b){
return a[b];
},object);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment