Skip to content

Instantly share code, notes, and snippets.

@edwardsmit
Created April 28, 2014 08:18
Show Gist options
  • Save edwardsmit/11365242 to your computer and use it in GitHub Desktop.
Save edwardsmit/11365242 to your computer and use it in GitHub Desktop.
Using the NodeJS equivalent of eval to help in selecting the contents of properties within nested objects, using 'dot-notation'
var sandbox = {};
require('vm').runInNewContext('x["dot.notated"]', {x: {'dot.notated':'hello'}});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment