Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7092555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:19:42+00:00 2026-05-28T08:19:42+00:00

I have two arrays idxListResponse & _index both of which have the same structure.

  • 0

I have two arrays idxListResponse & _index both of which have the same structure.

Each of these arrays contains a number of elements with different properties one of which is a child array called indexdata

Each element of this array has a number of properties one of which is another array called datafield. This has a number of key value pair properties.

So in essence I have a hierarchy of 3 separate arrays.

I’m looking to get the first level of the hierarchy + all elements of the 2nd level where the 3rd level items don’t match, i.e. exclude only those items from the 2nd level where the 3rd level items are a match.

I’ve tried approaching this a number of different ways but so far I’m not getting anywhere, could anyone help.

FYI – here’s my latest attempt

var q = idxListResponse.Index.Where(a =>
    a.IndexData.All(b =>
        b.DataField.All(c =>
            _index.Index.Where(z =>
                z.IndexData.All(y => y.DataField.Contains(c.name))
            )
        )
    )
);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T08:19:43+00:00Added an answer on May 28, 2026 at 8:19 am

    Except is a good way of doing that:

    var items = source1.Except(source2);
    

    Would return all items in source1 except those in source2.

    Since your collections appear to be different types, you would do something like:

    source1.Except(source2.Select(s => /* selector here */))
    

    Or you could create your own implementation of IEqualityComparer and use that to compare the two different types.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two arrays values and keys both of the same length. I want
I have two arrays. One is $categories which contains all categories retrieved from my
I have two arrays containing the same elements, but in different orders, and I
I have two arrays of objects which are likely to have the same values,
I have two arrays of products, both formatted exactly the same, like so: $products
I have two arrays with time values in them in this format. 00:00:00 which
I have two arrays consisting of a list emails which I need to send
I have two arrays. In each array I have objects with lots of properties
I have two arrays which contain objects of assets, now I want to subtract
I have two arrays a , b of the same length: a = [a_1,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.