How can I get the object length ?
In console my object looks like this:
Object { 2: true, 3: true, 4: true }
.length w
.length
We can also add a small validation if we are retrieving data from API.
app.filter('objLength', function() { return function(object) { return object ? Object.keys(object).length : ""; } });