Compare dictionary with data table

HI ,
Can anyone help me with below query:
I have dictionary contains data and i have data table , so i need to compare the key value of dictionary with data row of data table when both are matched i need to add the value of dictionary from the another of data table

from the Above two pics i need to add the values of datable Sum(Number of hours) into the dictionary of value

I would suggest using a LINQ statement with a GROUP BY function on the datatable to sum up the [Number Of Hours] column by [WBS_Level 6_Task Name]

Then you can use a for each statement to loop over the dictionary.keys and check if the key.tostring is found in the [WBS_Level 6_Task Name] column. If it is, then use an assign activity to change the key’s value in the dictionary. You can do this comparison by iterating through each row in the datatable, or by using another LINQ query

Discussion was forked by author and continues here:

Hello Datta,
In this video I have multiple examples with Dictionary:

Thanks,
Cristian Negulescu

1 Like

If we can use the data from data table, then why to use dictionary. why we convert data table into dictionary and then use it.

2 Likes