So i’m running Invoke-WebRequest to pull data from an OCR api, and its working!!! However, the only data i need from the return is under “Content” and it’s the “ParsedText” field. Here is what im returning:
StatusCode : 200 StatusDescription : OK Content : {"ParsedResults":[{"TextOverlay":{"Lines":[],"HasOverlay":false,"Message":"Text overlay is not provided as it is not requested"},"FileParseExitCode":1,"ParsedText":"JUST TOLD MY BOSS QUIT rnHE THOUG... RawContent : HTTP/1.1 200 OK Pragma: no-cache Content-Length: 377 Cache-Control: no-cache Content-Type: application/json; charset=utf-8 Date: Fri, 21 Jul 2017 15:04:40 GMT Expires: -1 Server: Microsoft-IIS/... Forms : {} Headers : {[Pragma, no-cache], [Content-Length, 377], [Cache-Control, no-cache], [Content-Type, application/json; charset=utf-8]...} Images : {} InputFields : {} Links : {} ParsedHtml : mshtml.HTMLDocumentClass RawContentLength : 377
How can i get JUST the ParsedText? I’ve tried throwing the results in a variable and using Select-Object, -expandproperty but to no avail.
submitted by /u/hansoloburgerz
[link] [comments]
The post Can’t figure out how to select data in what seems to be an array…help? appeared first on How to Code .NET.