Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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

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);
```