getdeep
v1.0.4
Published
like .get but goes all the way down
Downloads
2
Readme
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']