score:0
Accepted answer
var query = array
// filter out array items that are not objects
.oftype<jobject>()
// select the jproperty with the specified key
.select(o => o.property(key))
// filter for null (property was not found)
.where(p => p != null)
// and select a new jobject with just this property
.select(p => new jobject(p));
Source: stackoverflow.com
Related Query
- Json.NET LINQ query for single JProperty on JArray of JObjects
- LINQ to JSON - Query for object or an array
- LinQ Query for selecting multiple data in single row
- EF6 Single LINQ Query for nested Lists
- Proper syntax for LINQ to JSON query with nested arrays
- EF LINQ Query for selecting multiple table in single row and count
- Linq query “where [column] in (list of values)” that return single value for each values?
- C# Linq query search for a single keyword in multiple text files
- Searching for multiple strings using single database query with entity framework and LINQ
- Single linq query for complex data structure : Dict<int, Dict<str, _class>>
- c# .NET LINQ Query and returning a count for Excel to Json
- LINQ Query for GroupBy and Max in a Single Query
- JSON - LINQ Query for object or an array to group two data with same key value pair
- linq query for returning single row
- How to write Linq query for a Json file?
- Finding all children for multiple parents in single SQL query and Linq query
- JSON.NET: Flattening a JArray to JObjects within Linq Query
- use wrapper class to initialize mutiple models for single view and LINQ Query
- How to send a single json response from a vb.net linq query using the select option
- Adding a 3rd class in which 2 classes are subitems for linq query to end up displaying to json
- How to add single quotes for string value of dynamic query string and use it in linq
- Best way for retrieving single record results in LINQ to SQL
- Steps for a beginner to run very basic linq to sql query using Linqpad
- Linq query with multiple Contains/Any for RavenDB
- C# 6 null conditional operator does not work for LINQ query
- Returning a single property from a LINQ query result
- Get Max and Min in a single LINQ query
- Syntax for linq query to List<string>
- Deleting multiple records with Entity Framework using a single LINQ query
- Default value for linq select item if query didn't return anything
More Query from same tag
- LINQ Filter Implementation with Expressions
- EF Query: Give .Contains() a combination of two elements to act upon when getting the information from a Database
- Why is Linq not able to search Arabic Text?
- How to pivot data in LINQ without hard coding columns
- Linq query not returning anything
- C# Linq add elements from one list<custom> to another comparing them and changing values
- How to get all the rows of a table, where a column's value occurs more than once in LINQ to Entities?
- Filter linq query results using values from a list
- LINQ Sub group results with a single query
- How|Where are closed-over variables stored?
- select case in Datatable datarow in Linq
- Getting a continuous chain of values based on a condition in LINQ
- How to get a Cartesian product of a list containing lists?
- How do I specify the Linq OrderBy argument dynamically?
- Extend NHibernate Linq Provider
- entity framework Where method
- How do I exclude certain parts of a .Include on a condition?
- How to get records in EF that match a list of combinations (key/values)?
- Linq PredicateBuilder with conditional AND, OR and NOT filters
- Adding multiple xElements at once using LINQ to XML
- linq C# why the value change
- Count total sum of the same product name in my ASP.NET MVC Project
- Sort a list by alpha values first, numeric values next
- C# - Reading XML file
- C# Performance is slow on list comparisons using LINQ
- Custom Linq-to-SQL MappingSource
- reading value of node that has a specific attribute with Xdocument
- How to generate an index dictionary from a list of items in C# using linq and lambda
- Count items in list with LINQ
- LINQ to Entities does not recognize the method 'System.Object InjectFrom(System.Object, System.Object[])'