Skip to content

lukechinworth/getdeep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

getdeep

like .get but goes all the way down

use

var getDeep = require('getdeep');

works on objects like normal

getDeep('en', {en: 'the title', fr: 'le titre'}); // 'the title'

get deeper

getDeep('en', {
    title: {
        en: 'The title',
        fr: 'Le title'
    },
    body: {
        en: 'The body',
        fr: 'le texte'
    }
}); // { title: 'The title', body: 'The body' }

get arrays

getDeep('en', [
    {
        en: 'item 1',
        fr: 'point 1'
    },
    {
        en: 'item 2',
        fr: 'point 2'
    }
]); // ['item 1','item 2']

About

like .get but goes all the way down

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published