I have the following data structure
{
metadata: {
a: 0,
b: 4,
c: 1,
d: 6
}
}
I want to find a simple way to add all the variables in the metadata together without having to do them one at a time.. like metadata.a + metadata.b + metadata.c + metadata.d
I am hoping for a way to just add whatever variable exists in that
Any suggestions?