You can select dict["filePath"]for each dictin levelVariantURIDictsusing Select :
return levelVariantURIDicts.Select(dict => dict["filePath"])
.Distinct()
.ToList();
Drop .Distinct()if duplicate entries are accurate as a result.
Drop .ToList()if you really don't need to return ICollection <T> and IEnumerable <T> well.
source
share