Alright need a Jedi for this one

beantownace

Active member
Joined
Feb 15, 2019
Messages
25
Programming Experience
5-10
Fellow Jedi's I am trying to get two dictionaries combined I would be greatly appreciative if someone has an idea how to do this.

I have the following:
testing:
var col1 = new List<IDictionary<string, IDictionary<string, string>>(); //Dictionary has key of Account and then value is another dictionary of key pair values
var col2 = new List<Invoice>(); //has Account as a property as well as Invoice, Status
col1 is a 1 to Many to col2 which can have Account in the Invoice object multiple times
In col1 the dictionary key is an Account col1["Account"].
In col2 the Invoice has an Account property as well
I somehow need to combine col1 Dictionary with col2 into a new Dictionary where the key
will be a Tuple of Account and Invoice and then the value will be a combined dictionary key pair of col1 and col2 for that account.
The final result will be the Tuple will be unique for the col2 data but the col1 account data will be repeated for any Invoice object
Hope this makes some sense what I am trying to accomplish here.
 
Last edited by a moderator:
It would be better if you actually shows some sample input data and the expected output data.
 
Also you said you wanted to combine two dictionaries, but currently it looks like you are trying to combine two lists. You'll definitely have to explain further what you are trying to do.
 
Back
Top Bottom