C# Creating a unique list of rows from a LIST Array

I have an Array called nodeValues which contains a nested set of attributes for each product.  I need some help to identify only the unique set of attributes from this array.  This array contains a nested table for every product like this:

This table look like this:
    [0] nodeurl = Product 123
           Value
                       [0] Attributetitle = Price
                       [1] Attributetitle = Description
                      [2] Attributetitle = Weight
    [1] nodeurl = Product 888
           Value
                       [0] Attributetitle = Price
                       [1] Attributetitle = Description
                      [2] Attributetitle = Weight
   [2] nodeurl = Product 999
        ..............

All I want to is create a unique set of attributes from the nodeurl array.   For example;

                       [0] Attributetitle = Price
                       [1] Attributetitle = Description
                       [2] Attributetitle = Weight

Here is how I started to code for this:

 foreach (var items in nodeValues)
                  {
                      var Filtervalue = items.value.Select(item => item).Distinct().ToArray();
                      foreach (var attributes in Filtervalue)
                      {
                          FilteredAttributes.Add(....)   ---> How can I not add a duplicate attribute row?   Is there a way to prevent from adding the same attribute to this list array or perhaps a better way I get just get the unique attributes from this array without a forloop?
                      }
                  }

Below is the nodevalue class:

public partial class nodeValue : object, System.ComponentModel.INotifyPropertyChanged {
       
        private string nodeURLField;
       
        private value[] valueField;

Below are the list arrays.

List<FilteredValuesOfAttribure> FilteredValueOfProduct = new List<FilteredValuesOfAttribure>();
List<FilteredValuesOfAttribure> FilteredAttributes = new List<FilteredValuesOfAttribure>();

Below is the class:

public class FilteredValuesOfAttribure
    {
        public string attributeURL { get; set; }
        public string attributeTtitle { get; set; }
        public string value1 { get; set; }
        public string id { get; set; }
        public string name { get; set; }
    }
tmajor99Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AndyAinscowFreelance programmer / ConsultantCommented:
?

Unique for me means one of.  Do you mean if the Attributetitle 'price' appears for two products then it is NOT to appear in the list of unique values?  Because according to your example this list of unique values is empty, everything is duplicated in the two products (123 and 888).
0
Bob LearnedCommented:
It sounds like you need the LINQ DistinctBy operator:

LINQ DistinctBy - With Lambda Expression Parameter
http://www.elevenwinds.com/linq-distinctby-with-lambda-expression-parameter
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.