Last active
December 8, 2016 10:53
-
-
Save krishnasaga/e87408c878b1f48c564d69eab618938b to your computer and use it in GitHub Desktop.
JavaScript function for evolution object properties with '.' notation expression
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
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