Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nsisodiya/loopobject
just like forEach but for Object
https://github.com/nsisodiya/loopobject
Last synced: 28 days ago
JSON representation
just like forEach but for Object
- Host: GitHub
- URL: https://github.com/nsisodiya/loopobject
- Owner: nsisodiya
- License: mit
- Created: 2016-10-07T04:18:35.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-10-07T04:50:32.000Z (about 8 years ago)
- Last Synced: 2024-04-26T07:43:54.288Z (8 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# loopObject
just like forEach but for Object# Install
```bash
npm install loopobject --save
```
# Use```js
import loopObject from "loopobject";
var data = {
'2016-09-15': {
price: 34,
available: 45
},
'2016-09-16': {
price: 34,
available: 45
},
'2016-09-17': {
price: 34,
available: 45
},
'2016-09-18': {
price: 34,
available: 45
}
}loopObject(data, function(v, staydate){
console.log(`Price of HotelRoom on ${staydate} is ${v.price}`);
}, true);
```