Consider:

```javascript
Object.keys(frequency).forEach(function (item) { /* la la la */})
```