Probably doing something weird but. I have a JSONObject containing 2 tables, one of which is “report”
I want to return te number of lines for a specific “status” to a string but it can’t be
JSONContent(“report”)(1)(“numberoflines”) (which does work) as I can’t be sure of the sort.
So I want to filter on the row “status”: “Checked”
So I need something like JSONContent(“report”).AsEnumerable().Where(Function(r) r(“status”).ToString = “Checked”)(“numberoflines”) but can’t figure it out.
It all sounds logical. You state it is an Array but so far I can tell the JSONContent is a JObject. It is defined as datatype JObject as response from an API call. Trying to read is as Datatype JArray doesn’t work as is states “Current JsonReader item is not an array”
So tried your, and Yoichi’s, options, but it keeps coming back with the same style error ((')'expected and disallow from string to boolean) which I cannot place in perspective.
It keeps bothering about
“…Where(Function(r) r(“status”).ToString()”.(2) : error BC30198: ‘)’ expected. (2) : error BC30512: Option Strict On disallows implicit conversions from ‘String’ to ‘Boolean’."
irrelevant of my first tries of the options you have given. As if it doesn’t recognise that the “= “Checked”” is part of the comparisson