Skip to content
Advertisement

Conbine arrays to organized payload data

I am trying to unique values from this for loop and organized them Payload:

JavaScript

I Have a payload that I am trying to organized the data into arrays based on the “unique” name so I can total the results and eventually pass it to a PDF. The column that I am trying to create is a total Column.

example.

JavaScript

what is the best way to go about this? I thought about doing array_unique

Advertisement

Answer

here is my approach

JavaScript

Demo : https://3v4l.org/U3nQ0

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement