I have the following arrangement
var cargos = [{
"TipoProducto": "Cargo",
"Referencia": "IM",
"Precio": 73710
}, {
"TipoProducto": "Cargo",
"Referencia": "IM",
"Precio": 32856
}, {
"TipoProducto": "Cargo",
"Referencia": "IS",
"Precio": 220970
}, {
"TipoProducto": "Cargo",
"Referencia": "IS",
"Precio": 98568
}];
What I need to do is add the ones that are IM and add the ones that are IS, and I should have an arrangement
var cargos = [{
"TipoProducto": "Cargo",
"Referencia": "IM",
"Precio": 106566
}, {
"TipoProducto": "Cargo",
"Referencia": "IS",
"Precio": 319538
}];
Any ideas on how to do it in js