Why the lambda expression is not executed?

is written in json responseString
{"response":{"items":[{"id":1397,"date":1559977207,"owner_id":-56279925,"from_id":-56279925,"post_type":"post","text":"\"Java storm!\" - #camp on programming in #Java for students aged 12 to 17 in Kazan. \n\Organizatory the Higher school of ITIS KFU and the Center for Children's Intellectual Development \"Brain storm\". Classes are held from Monday to Friday at Kazan Federal University.\n\Padres venue: Kazan, Professora nuzhina, 2 (KSK KFU\"UNIX\", the coworking of the Higher school of ITIS). Participants will learn the basics of Java development, write your web app and will work in a team. Particular emphasis is placed on learning object-oriented programming in Java.\n\after lunch, the guys are waiting for games, quests, tours of the city. Schedule of classes:\n - 09:00 - 12:00 - classes :Programming Java;\n - 12:00 - 13:00 - lunch\n - 13:00 - 17:00 - games, quests, a tour of the it Park, excursions to museums of Kazan Federal University.\n\NIN the cost of changing the included 2 meals a day. Read more: +7 900 324 32 60 and https:\/\/www.kidsreview.ru\/world\/catalog\/camps\/java-shturm-lager-po-programmirovaniyu-na-java-dlya-shkolnikov-12-17-let-v-kazani","marked_as_ads":0,"attachments":[{"type":"photo","photo":{"id":456239404,"album_id":-7,"owner_id":-56279925,"user_id":100,"sizes":[{"type":"m","url":"https:\/\/pp.userapi.com\/c849520\/v849520352\/1b5397\/hV3d_sFrXi0.jpg","width":130,"height":87},{"type":"o","url":"https:\/\/pp.userapi.com\/c849520\/v849520352\/1b5399\/Wl0GmyNEA-U.jpg","width":130,"height":87},{"type":"p","url":"https:\/\/pp.userapi.com\/c849520\/v849520352\/1b539a\/diK8J6Q7BhU.jpg","width":200,"height":133},{"type":"q","url":"https:\/\/pp.userapi.com\/c849520\/v849520352\/1b539b\/jQTm6l9A2Ak.jpg","width":320,"height":213},{"type":"r","url":"https:\/\/pp.userapi.com\/c849520\/v849520352\/1b539c\/oYNiLlZa3x8.jpg","width":510,"height":340},{"type":"s","url":"https:\/\/pp.userapi.com\/c849520\/v849520352\/1b5396\/awe2T5YUJ7o.jpg","width":75,"height":50},{"type":"x","url":"https:\/\/pp.userapi.com\/c849520\/v849520352\/1b5398\/8FnAsa_8G4w.jpg","width":600,"height":400}],"text":"","date":1559947643,"access_key":"83c3c6d0fa120c0326"}},{"type":"link","link":{"url":"https:\/\/www.kidsreview.ru\/world\/catalog\/camps\/java-shturm-lager-po-programmirovaniyu-na-java-dlya-shkolnikov-12-17-let-v-kazani","title":"\"Java storm!\", camp programming in Java for students aged 12 to 17 in Kazan, the 11 Billboard shifts","description":"Promotion to site","target":"internal","photo":{"id":456272256,"album_id":-27,"owner_id":2000057564,"sizes":[{"type":"l","url":"https:\/\/pp.userapi.com\/c848636\/v848636352\/1b0f54\/x8ryZVy8I5Y.jpg","width":537,"height":240},{"type":"m","url":"https:\/\/pp.userapi.com\/c848636\/v848636352\/1b0f51\/7KaH1cYospI.jpg","width":130,"height":87},{"type":"p","url":"https:\/\/pp.userapi.com\/c848636\/v848636352\/1b0f53\/EvFHZOrRx0w.jpg","width":260,"height":173},{"type":"s","url":"https:\/\/pp.userapi.com\/c848636\/v848636352\/1b0f50\/qO40_HEhJTM.jpg","width":75,"height":50},{"type":"x","url":"https:\/\/pp.userapi.com\/c84863

run the code to remove the extra group elements in the owner_id which is not in the list
dynamic vkData1 = JsonConvert.DeserializeObject(responseString);
var vk1 = vkData1.response;
var resultItems = vkData1.response.items.Where(t => !owner1.Any(t.Owner_Id));

here is the code but I have error
cannot use a lambda expression as the argument to dynamically send transactions without prior conversion to the delegate type or expression tree
March 23rd 20 at 19:37
2 answers
March 23rd 20 at 19:39
Because he does not know the type. Where is a static extension method for IEnumerable. Because the type of the items is unknown because of the dynamic he doesn't know about Where. Try


either replace the dynamic to a more specific type.
now this error - Autumn_Ratke commented on March 23rd 20 at 19:42
@Autumn_Ratke, Try IEnumerable - Kasandra.Bins commented on March 23rd 20 at 19:45
IEnumerable<object> - Kasandra.Bins commented on March 23rd 20 at 19:48
Thank you very much, but that's the error again
5cfba78c21ca9439297526.jpeg - Autumn_Ratke commented on March 23rd 20 at 19:51
@Autumn_Ratke, of course - then there won't be Any - it is necessary to lead to relevant types - Kasandra.Bins commented on March 23rd 20 at 19:54
@Kasandra.Bins, I'm sorry, but I don't know what type yet get( - Autumn_Ratke commented on March 23rd 20 at 19:57
@Autumn_Ratke, You need to create classes copying the serialized objects from JSON. it is easiest to use a third-party library to work with VC - Chaim.Koss commented on March 23rd 20 at 20:00
@Autumn_Ratke, so it will be difficult. Understand what is dynamic and what is different from object. What is IEnumerable and what types of returns sterilisator (at least in the debugger view). - Kasandra.Bins commented on March 23rd 20 at 20:03
March 23rd 20 at 19:41
var resultItems = vkData1.response.items.Where(t => !owner1.Any(t.Owner_Id)).ToList();

Check my code. Must earn.

Find more questions by tags C#