Jun-13-2018, 02:03 PM
Hello All,
So let me get straight to my issue, I've got nested array which is a result set from a SQL query and has the format similar to the below.
'Resp' is the only unique column and 'ticket' often has duplicates.
I hope I've been clear enough?
So let me get straight to my issue, I've got nested array which is a result set from a SQL query and has the format similar to the below.
'Resp' is the only unique column and 'ticket' often has duplicates.
[[ticket,resp,quantity]]So for example if the array is printed (for x in x) you would get the below sample data
[56789,1326,10] [12345,2365,1] [56789,2542,20] [12345,8468,5]What I'm looking to do is add the 'quantity' field where the 'ticket' numbers are the same and produce a new nested array, the unique resp could be dropped at this point as I’m not sure if it's needed yet. The above sample data would become the below
[56789,xxxx,30] [12345,xxxx,6]I've tried a few things but never quite seem to get it working. Any advice or directing would be appreciated.
I hope I've been clear enough?