Need Help in Fetching Data from object of array

i HAVE data as below
[{ Value = Completed, g = 2 }]

I need to get the g value which is 2. Can you please suggest any solution

Quick and dirty approach on fixed string:

last two lines for a clean defined string array

However doing it with RegEx would be the better way. But for this it would be better to define some more requirements


Actually i am tryin to group a datatable based on column status and try to fetch the count in each group. I tried using below linq. Please help me if i can optimize better, I just need grouped count.


Please suggest me the better way to do it please.

sure a more mature and flexible code would be helpfully.

But before risking a XY Problem, so post data from datatable and describe your requirments in detail, what you need for the count statistics

1 Like

I have an Excel which contains having a column named Status with completed and incomplete, I need to write an linq to group by Status and get the count.

Here is an sample excel:


Find starter Help with a generic dataset here:
3Col_1Key_grpCount_2Col-Result.xaml (9.0 KB)

Let us know If you do need more help for complete your scenario

Thanks a lot buddy !

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.