Simple ObjectPath
JavaScript object navigation.
Simple ObjectPath is a module that allows you to navigate to a given location within a Javascript object. Allows simpler access to deeply nested properties. Allows validation of existence of those same deeply nested properties.
Installation
$ npm install simple-object-path
Usage
var objectPath = ; var obj = animal: type: 'Feline' dailyNeeds: timeOfDay: 'morning' need: 'Breakfast' timeOfDay: 'evening' need: 'Dinner' ;var result = ;console; // 'evening' var objWithArray = prop: array: '0,0,0' '0,0,1' '0,1,0' '0,1,1' '1,0,0' '0,0,1' '1,1,0' '1,1,1' ;var resultNestedArray1 = ;console; // '0,1,1'var resultNestedArray2 = ;console; // null