Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/lukechinworth/getdeep
- Owner: lukechinworth
- Created: 2016-07-01T22:56:53.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-11T06:26:54.000Z (about 7 years ago)
- Last Synced: 2024-10-12T22:28:03.501Z (about 1 month ago)
- Topics: deep, recursive, utility
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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']
```