Iterate through a datatable based on the specific condition of column

Hii,
I have a columns in a datatble

col1 Col2 col3
566 tyu hfvl
566 ylf khg
566 hujyg gku
566 uog ubh
566 kug jkbg
78 yifly6 hgyl
78 uyr6 gkcc

like this i have more columns ahead
my requirement is first i need to iterate through all columns only those value of column1 is 566,then i need to iterate all the other columns of having column1 value 78

plss help

Hi @Doonline,

Does always the Col1 will be 566 and 78 or it vary?
Also, after iterating what is the next process?

Regards,
@90s_Developer

it will very for evry other file.I just showed here for example purpose.
I need to compare the other columns with another datatble

@Doonline,

So, you have to iterate the value first with the biggest number and then with the small number right?

Regards,
@90s_Developer

no,There is nothing concept like bigger and smaller

@Doonline,

So, can you post your issue clearly and as per that only solution can be found.

Regards,
@90s_Developer

the value of 1st columns is different
Based on the code value of col1 i have many other different files.
so based on the code value only i need to extract the other columns.
So for particular file i only want the columns wherever this code value present in col1

like for code 566

566 tyu hfvl
566 ylf khg
566 hujyg gku
566 uog ubh
566 kug jkbg

this much value should get from the whole datatable

For code 78
78 yifly6 hgyl
78 uyr6 gkcc
This much value should get extract from the whole datatable

Hi @Doonline ,

Do we get only two different codes every time or we can get more than two. please confirm. thanks.

it can be many

have a check on this pattern, maybe it works directly or need some minimal adoptions:

taken from [HowTo] Overview on different options for grouping data and processing the groups