I am using an object to store state and the object looks like this:
{
"CPC": 0,
"NDP": 0,
"LPC": 0,
"GPC": 1,
"PPC": 2
}
Where all the key values are an enumerator of a generic type <T>
.
Suppose I can call this object, as such:
console.log(this.optionVotes());
// Produces:
{ "CPC": 0, "NDP": 0, "LPC": 0, "GPC": 1, "PPC": 2 }
What is the best way I can get the of value 3 from this?