OMG this is how LOL
var serverSetup = lookup["Server Setup"]
.First().SkipWhile(s => s.ToString().ToUpper() != "V").Skip(1).First();
ok this makes sense. so first we get the SET, evaluate the expression, then get the value.
If i changed the code to the suggested in post 22, i am getting "V"...
var serverSetup = lookup["Server Setup"].First().First();
i need to somehow retain the condition but that result in sequence contains no elements...
var serverSetup = lookup["Server Setup"]...
oh i thought with step into operator it continues the execution regardless. Anyhow, i put it after and serverSetup is still NULL...
Interestingly, i see Key is "Server Setup" but no Values like i would with dictionary!
This is what im seeing. the lookup is NULL but why?
System.NullReferenceException
HResult=0x80004003
Message=Object reference not set to an instance of an object.
so:
yields 2 sets:
{{V, Cloud} {Location,Central (multi-location)}}
Then
lookup["Server Setup"].First() yields {V, Cloud}, so technically the 2nd First()
lookup["Server Setup"].First().First()
yields V ?
makes sense. so according to the docs here, we'd typically loop through a collection like that (array of array), or via LINQ...
I thought since in post 22 we are 1st returning the 1st set, then we return the value (which would be another set), a 3rd First() should do the trick to return 1 value...
...7.0896,
7.8999,
7.2158,
4.1835,
7.2158
],
"text": "*If more than 1 location, add info on the locations form",
"words": [
{
"boundingBox": [
4.1835...
Hey John
if you dont mind, could you explain how you arrived at a threshold of +/-0.12?
On the pseudocode page, its easy to determine that the poster is trying to group by 5 but with the lines grouping here, i thought it may be the difference between the y coordinates from one label to another...
hmm, according to Azure computer vision REST API , the doc says:
which is why ive been just referring to it as OCR since "Azure Computer Vision Read API" is a pretty long description lol
...7.0896,
7.8999,
7.2158,
4.1835,
7.2158
],
"text": "*If more than 1 location, add info on the locations form",
"words": [
{
"boundingBox": [
4.1835...
This is a very good point. Ive reviewed with the team and they said this form will be the official template, so we won't have to worry about variances.
Since that's the case, does the desired output im seeking from the JSON still not meet the condition in post#8? In other words, the above code...
...7.0896,
7.8999,
7.2158,
4.1835,
7.2158
],
"text": "*If more than 1 location, add info on the locations form",
"words": [
{
"boundingBox": [
4.1835...
i see. so ive tried the following:
var pairs = lines.SkipWhile(r => r == "Practice Name").Pairs();
However I am getting "Operator '==' cannot be applied to operands of type 'Line' and 'String'"
I think I understand what this error means, in that Line is not of Type String to enable a direct...
This is awesome, thank you Skydiver. Although, wouldnt the fact that i have to explicitly skip over a certain Line, i.e. "Account Information", mean that Im still technically confined to the JSON structure? In other words, doesnt this mean that if i had another JSON file structure with more...
Interesting...could you demonstrate ”ingesting the lines in pairs and setting up the values to go out into the csv”? I think what compelled me to use choJSONReader is due to choCSVWriter since ultimately that's what I want, to write properties/values to csv.
If it's just a wrapper around the...
I have read it.
Populating the object works in the Account class example they show because it's a property/attribute to value relationship. Therefore, deserializing it dynamically is very easily done. However, in the json I've given in my post, this method does not work because the attributes...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.