Search results for query: *

  1. WeyardWiz

    Resolved How to get values from elements in JSON without indexing?

    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.
  2. WeyardWiz

    Resolved How to get values from elements in JSON without indexing?

    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"]...
  3. WeyardWiz

    Resolved How to get values from elements in JSON without indexing?

    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!
  4. WeyardWiz

    Resolved How to get values from elements in JSON without indexing?

    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.
  5. WeyardWiz

    Resolved How to get values from elements in JSON without indexing?

    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 ?
  6. WeyardWiz

    Resolved How to get values from elements in JSON without indexing?

    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. WeyardWiz

    Resolved How to get values from elements in JSON without indexing?

    ohhh i see! so difference of first item with label, e.g. 6.5768 (server setup)-6.5025 (V) = 0.0743 and largest difference in group is that with the 1st 2 items, e.g. 6.6145 (Cloud) - 6.5025 (V) = 0.112 btw, Lookup instead of ToDictionary is giving me issues... var lookup = groups.ToLookup(g =>...
  8. WeyardWiz

    Resolved How to get values from elements in JSON without indexing?

    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...
  9. WeyardWiz

    Resolved How to get values from elements in JSON without indexing?

    Interesting. Its my first time delving into the AI/machine learning space of any sorts so good to know.
  10. WeyardWiz

    Resolved How to get values from elements in JSON without indexing?

    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
  11. WeyardWiz

    Resolved How to get values from elements in JSON without indexing?

    right. it seems like "LI" represent the left, bottom, and right edges of the box. the OCR API definitely needs improvement when it comes to images.
  12. WeyardWiz

    Resolved How to get values from elements in JSON without indexing?

    my bad, you're right, was just an example of the string it produces. here is an un-tilted version of the image and resulting JSON: JSON: { "status": "succeeded", "createdDateTime": "2020-10-30T15:56:11Z", "lastUpdatedDateTime": "2020-10-30T15:56:12Z", "analyzeResult": {...
  13. WeyardWiz

    Resolved How to get values from elements in JSON without indexing?

    ohhh thats a good explanation, never thought about it that way. but even with a non-titled image, i still got an "I"cloud.
  14. WeyardWiz

    Resolved How to get values from elements in JSON without indexing?

    That is brilliant! I just tested it out and its working like a charm! Couple questions: if i change ToDictionary to ToLookup, i get an exception for the values: sequence contains no elements. of course, using FirstOrDefault() suppresses the exception, but i endup with null output anyways...Do i...
  15. WeyardWiz

    Resolved How to get values from elements in JSON without indexing?

    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...
  16. WeyardWiz

    Resolved How to get values from elements in JSON without indexing?

    Awesome, this does the trick indeed :) btw, this JSON structure is generated through Azure computer vision REST API from a pdf input like this: I mention this because i understand what the IEnumerable code is doing, but there is one edgecase that may not conform to how it operates...
  17. WeyardWiz

    Resolved How to get values from elements in JSON without indexing?

    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...
  18. WeyardWiz

    Resolved How to get values from elements in JSON without indexing?

    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...
  19. WeyardWiz

    Resolved How to get values from elements in JSON without indexing?

    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...
  20. WeyardWiz

    Resolved How to get values from elements in JSON without indexing?

    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...
Back
Top Bottom