How to sort the output of the data scraping



Hello guys,

I used data scraping to scrap the data from web which contains four columns. I have stored the data in a variable which is of type datatable. All I want is to sort the output and get the details of a single column.testupload.xlsx (9.6 KB)

Here I have to extract data according to following conditions:

item : levis
business : import

I have stored the result in a variable called ‘var’ and used ASSIGN activity
var=extractdatatabe.Select(“item=‘levis’ AND business=‘import’”)
and now my requirement is that : I have to get the PRICE of the above filtered output.

ie… I have to get the price of ‘levis’ item which comes under business ‘import’

I have attached a sample csv file which is simiar to my “Extracted” data!!

Have been trying to solve this since 2,3 days… and finally came here for your help…
No other way xD…
Please help me to get this solved!!!


@UnicornStark, Use the following query,

StringArray = (From row in dt.AsEnumerable()
Where row(“item”).ToString.Equals(“levis”) and row(“business”).Tostring.Equals(“import”)
Select Convert.ToString(row(“Price”))).ToArray()

Dominic :slight_smile:

Sort a Data Scraped Result According to a condition

@599712 Thanks for the immediate reply, Can you please tell me where should I use the query??
Is it inside the Assign activity?


@UnicornStark, Yes in Assign activity !

Dominic :slight_smile:


Oops… String[] strArray ???
Didnt get that part… Is that the name of the variable in which the output of the extracteddatatable is stored??


@UnicornStark, Create a variable with a datatype as StringArray.

Regards ,
Dominic :slight_smile: