G
gregarican
I have an array that I would like to combine elements. Here's a sample
array:
[["Value A", "Value B", 3], ["Value A", "Value C", 2],["Value A",
Value B", 1]]
What I would like to do is find the elements where the first two items
are the same and then combine the third. The resulting array would
consist of:
[["Value A", "Value B", 4],["Value A", "Value C", 2]]
This is something that is out in left field in terms of how I've used
arrays in the past. Anyone know of a quick bit of script I can whip up
that will suit the task?
array:
[["Value A", "Value B", 3], ["Value A", "Value C", 2],["Value A",
Value B", 1]]
What I would like to do is find the elements where the first two items
are the same and then combine the third. The resulting array would
consist of:
[["Value A", "Value B", 4],["Value A", "Value C", 2]]
This is something that is out in left field in terms of how I've used
arrays in the past. Anyone know of a quick bit of script I can whip up
that will suit the task?