SUM data collection firebase

Hi I need SUM this data
I want SUM for example:

“Cobertura Obra Socias”
Or
“A pagar”
I tried with SUM_key(datafirabese, CoberturaObrasocial.stringValue)

But it does not work

Can you help me?

“documents”: [
{
“name”: “projects/apf-app/databases/(default)/documents/pedidos/sUBnz2hCF4wnopQM8JLS/productos/GEGDtYIcbxIa7MnnhSHR”,
“fields”: {“Cobertura Obra Sociasl“: {
“stringValue”: “300”
},
“cantidad”: {
“integerValue”: “1”
},
“PrecioSugerido”: {
“stringValue”: “100”
},
“nombre”: {
“stringValue”: “producto 3”
},
“A Pagar”: {
“stringValue”: “200”
},
“Precio Presupuesto”: {
“stringValue”: “600”
}
},
“createTime”: “2021-03-25T10:40:32.833808Z”,
“updateTime”: “2021-03-25T10:40:32.833808Z”
},
{
“name”: “projects/apf-app/databases/(default)/documents/pedidos/sUBnz2hCF4wnopQM8JLS/productos/I2k9A9KfvPOnTetGbBmO”,
“fields”: {
“Precio Presupuesto”: {
“stringValue”: “500”
},
“Cobertura Obra Sociasl”: {
“stringValue”: “300”
},
“nombre”: {
“stringValue”: “producto 1”
},
“PrecioSugerido”: {
“stringValue”: “200”
},
“cantidad”: {
“integerValue”: “2”
},
“A Pagar”: {
“stringValue”: “200
}
},
“createTime”: “2021-03-25T10:43:54.359491Z”,
“updateTime”: “2021-03-25T10:43:54.359491Z”
},

This seems to be a duplicate of this thread.

1 Like