I have an object that contains data on collected trash, dangerous areas, schools, and trash bins with different numerical values. I am looking to retrieve all of these values.
The object provides the following information:
{__ob__: Observer}
collectedTrashCount: 139
dangerousAreaCount: 11
schoolCount: 5
trashBinCount: 44
To access the value of collectedTrashCount
, I would use the following method:
computed: {
dashboardList: function () {
return this.$store.getters.getDashboard;
},
checkCount: function () {
console.log(this.dashboardList.collectedTrashCount);
}
},
By running console.log
as shown above, I would get the result 139
.
My question is: How can I retrieve and display all the values from the object, such as 139
, 11
, 5
, and 44
?