I have a collection of collections, all the child collections have the same number of elements. The parent collection does nothing other than hold the child collections.
[0] [Child_0] [ID: 1]
[0] [Child_0] [Amount: 4]
[0] [Child_1] [ID: 2]
[0] [Child_1] [Amount: 7]
[1] [Child_0] [ID: 1]
[1] [Child_0] [Amount: 2]
[1] [Child_1] [ID: 2]
[1] [Child_1] [Amount: 4]
[2] [Child_0] [ID: 1]
[2] [Child_0] [Amount: 5]
[2] [Child_1] [ID: 2]
[2] [Child_1] [Amount: 3]
For my output I don't care about the parent collection. I just want an anonymous type of ID and average of amounts, so for the above it would be
ID Avg
1 3.66
2 4.66
Language of the response does not matter.
Thanks.