It should be a simple task but I'm having a little bit of trouble
doing it.
I have the following object:
{
"chatRoom": [
{
"_count": {
"publicMessages": 10
}
},
{
"_count": {
"publicMessages": 10
}
},
{
"_count": {
"publicMessages": 10
}
}
],
}
I would like to get the total sum of every value
inside "publicMessages"
The desidered output:
{
"totalMessages": 30
}