NewtonSoft JArray - how to select multiple elements with LINQ
问题 I have some JSON which I then parse to JArray object. I want to filter the JArray so it then has only two properties, Title and BodyText. But whatever I try I can only select one value using LINQ. [HttpGet] public JsonResult AjaxGetNewsItems() { string json = JsonConvert.SerializeObject(news.GetNewsItems(), formatting:Formatting.Indented); var v = JArray.Parse(json); //var items = // v.Where( // x => // x["Title"].ToString() != string.Empty && // x["BodyText"].ToString() != string.Empty) //