можно получить такой объект где будет только totalPrice и если да то как получить 200

const a = [
    {price: 20, quantity: 1, totalPrice: 20},
    {price: 20, quantity: 3, totalPrice: 60},
    {price: 30, quantity: 4, totalPrice: 120},
    {totalPrice: 200}
]

Ответы (0 шт):