carbone icon indicating copy to clipboard operation
carbone copied to clipboard

[Feature Request]: Applying data manipulation in array with filters

Open imdevlord opened this issue 4 years ago • 1 comments

I just read the documentation but I'm not if there is any way to perform data manipulation in array with filters. What's the use case?

const data = { "array" : [{ "type": "good", "qty": 3 },{ "type": "bad", "qty": 1 },{ "type": "good", "qty": 3 },{ "type": "bad", "qty": 5 }] }

I would like to have a table for each type of data, displaying a column with each qty and the sum at the end. Type: good Qty: 3 Qty: 3 Sum: 6

Type bad: Qty: 1 Qty: 5 Sum: 6

Right now I think it's possible filter arrays, but it isn't possible to perform operations over the object properties in the array.

imdevlord avatar Nov 07 '20 14:11 imdevlord

Hello @imdevlord, I advise you to design the JSON data set differently and you should compute the sum before.

steevepay avatar Nov 18 '20 15:11 steevepay