Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lukechinworth/getdeep

like .get but goes all the way down
https://github.com/lukechinworth/getdeep

deep recursive utility

Last synced: about 18 hours ago
JSON representation

like .get but goes all the way down

Awesome Lists containing this project

README

        

# getdeep
like .get but goes all the way down

# use
```javascript
var getDeep = require('getdeep');
```

works on objects like normal
```javascript
getDeep('en', {en: 'the title', fr: 'le titre'}); // 'the title'
```

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

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