score:0
Accepted answer
var mykeys = objawithb.where(
kvp => kvp.value.any(v => v.prop1.equals(objb.prop1) )
).select(kvp => kvp.key);
score:0
objawithb.where(g => g.value.any(b=>b.prop1.equals(objb.prop1)))
.select(g => g.key).tolist();
score:0
dictionary<a, list<b>> objawithb = new dictionary<a, list<b>>();
b objb = new b();
objb.prop1 = "aaa";
objawithb.where(g => g.value.any(x => x.prop1 == objb.prop1))
.select(g => g.key)
.tolist();
Source: stackoverflow.com
Related Query
- Get keys (objects) from a dictionary that contains list and filtered by values
- LINQ: Getting Keys for a given list of Values from Dictionary and vice versa
- List of objects to Dictionary with distinct keys and selected values
- Linq - Get all keys from dictionary where all values in the value list are equal to criteria
- Check if list contains element that contains a string and get that element
- Search dictionary values and return List of keys meeting conditions
- How do I combine the keys and values of a Dictionary into one List using LINQ?
- Compare id's of objects in two lists and get the list of objects that includes objects with ids occurring in both of them
- Get keys as List<> from Dictionary for certain values
- How to get keys and values from Appsettings of Config file in Linq
- LINQ: Given A List of Objects, Create a Dictionary with child objects as keys and Parent Objects as Value
- Linq query to Check and get dictionary item from list of dictionary items
- get keys and vlaues from dictionary except "foreach"
- Cannot get more than one result when using System.Linq.Dynamic.Core to query a list of objects that have a member dictionary
- Sort on list of objects that contains dictionary
- How to find keys in a Dict<int,List<Tuple<string,string>>> such that the list contains elements with given Item1 and Items
- Get a list of specific values from a C# Dictionary
- I have 2 Lists of strings. How do I get a bool that tells me if one lists contains atleast one string from the other list ? (Using Lambda)
- get values from nested Dictionary using LINQ. Values of Dictionary are list of lists
- How to extract values from a list of dictionaries and group and convert to a single dictionary with Linq?
- Get values from list that match BOTH attributes using c# LINQ
- Compare keys of dictionary with values of List and return all the matching values including duplicates
- Check if HUGE dictionary contains a string and get all elemets that match element
- Group dictionary by values and return list of keys
- Quickly get distinct values from SP list that user has permission to view
- filter items from list of dictionary in c# based on matching key and values
- Get objects from dictionary with equal properties values for every Key
- Retrieve all values that partly contains values from a list
- Get The Full List Of Objects In A Dictionary Values
- How to get flattened list from dictionary key query where values are lists?
More Query from same tag
- Include statement return empty list/null Linq
- How to make a Lambda expression Reusable in multiple LINQ Queries
- Get time sensitive specific data from SQL db in .Net
- How to use Union in Linq Query
- VB.NET Returns IEnumerable(Of IEnumerable(Of T)) when Using Group By LINQ Statement
- Faking a repository - faking Find method
- Simple LINQ to XML
- linq query to get child items through self referencing join table
- Best Practices: EfCore/Linq - Single vs SingleOrDefault - Better exception messages
- Null-conditional operator analog in .NET 3.5 / 4.0, VS 2012 / 2013?
- LINQ Query - how sort and filter on eager fetch
- How to perform inner join Query in LINQ
- Using Or and Select in a Where clause to compare all entries with an int, with lambda expressions
- Doing a join such that the first row only is returned
- Best way to querying a list by group by in 1 to n relation entities
- How do i get the difference in two lists in C#?
- substring with linq?
- how to cast object of type '<TakeIterator>[System.Data.DataView]' to type 'System.Data.DataView'.?
- How to avoid redundant List using LINQ
- Mixing Silverlight-Specific System.Xml.Linq dll with Non-Silverlight System.Xml.Linq dll
- What is the best way to find length of split characters from the given string by using String.Split() Method or Linq Lambda Expression in C#
- LINQ - How to ignore empty lists in where
- How to convert a list of ints to a string array in Linq?
- linq and string of array problem. Try to find elements in string of array
- method to process linq group
- How do I do a OfType<>().Count() on a heterogenous collection in NHibernate?
- Calculate average with linq without grouping
- Issue with converting XML document to string array
- How to read xml file having different hierarchy in .net
- Query children and its children until there are no children simplified