get-nested-object!
This plugin helps find and return a nested object or array included in parent arrays or objects.
Install
Install with npm:
npm install --save get-nested-object
Usage
// Find and return a nested object or array included in parent arrays or objects. // Exp1var getNestedObject = ;const obj = id: 101 email: 'jack@dev.com' personalInfo: name: 'Jack' address: line1: 'westwish st' line2: 'washmasher' city: 'San Jose' state: 'WX' education: school: NIIT: country: name: 'Vietnam' location: 'Asia' city: 'Saigon' country: name: 'Canada' location: 'North America' city: 'Vancouver' NAIT: country: 'Canada' city: 'Edmonton' country: 'Canada' city: 'Vancouver' project: description: 'caro' language: 'c#' description: 'snake' language: 'c++' ;;// => { country: 'Canada', city: 'Vancouver' }; // Exp2const obj = 1 2 3 4 5 'a' 'b' 'c' firstName: 'Khoa' lastName: 'Huynh' ;;// => 'c';
Test
npm run test