Parsing through JSON file

My json data is :-

{“DocumentName”:“main_invoice1-20191218182635”,“DocReferenceKey”:"",“DocumentId”:50286.0,“TeamId”:4581.0,“TemplateId”:10744.0,“TemplateName”:“main_invoice1”,“CapturedUserId”:12180.0,“CapturedDate”:“2019-12-18T12:56:35.16”,“CapturedUser”:“Yash Bitla”,“VerifiedUserId”:0.0,“VerifiedDate”:null,“VerifiedUser”:null,“AdditionalData”:null,“Pages”:[{“PageId”:15610.0,“PageName”:“Page #1”,“PageOrder”:1.0,“OrginalFileName”:“1.jpg”,“Fields”:[{“FieldName”:“Vessel name”,“Value”:“NAVIOS UNISON”,“ConfidenceLevel”:100.0,“Coordinate”:"(406,91,553,105)"},{“FieldName”:“Container”,“Value”:“APRU5787620”,“ConfidenceLevel”:100.0,“Coordinate”:"(405,120,531,134)"},{“FieldName”:“Arrival week”,“Value”:“14”,“ConfidenceLevel”:100.0,“Coordinate”:"(900,91,927,105)"},{“FieldName”:“Inspection date”,“Value”:“2019-04.01”,“ConfidenceLevel”:100.0,“Coordinate”:"(900,120,1001,134)"},{“FieldName”:“Inspection place”,“Value”:“NLRTM”,“ConfidenceLevel”:100.0,“Coordinate”:"(908,150,972,164)"},{“FieldName”:“PackDate”,“Value”:“02/24/2019”,“ConfidenceLevel”:100.0,“Coordinate”:"(763,314,856,328)"},{“FieldName”:“Customer”,“Value”:“DFEU”,“ConfidenceLevel”:100.0,“Coordinate”:"(763,368,812,382)"},{“FieldName”:“Label”,“Value”:“DOL”,“ConfidenceLevel”:100.0,“Coordinate”:"(1021,368,1058,382)"},{“FieldName”:“Netweight”,“Value”:“4530”,“ConfidenceLevel”:100.0,“Coordinate”:"(1020,476,1061,490)"},{“FieldName”:“ChiIdGTIN”,“Value”:"",“ConfidenceLevel”:100.0,“Coordinate”:"(897,502,984,523)"},{“FieldName”:“TargetMarket LD”,“Value”:“Netweight”,“ConfidenceLevel”:100.0,“Coordinate”:"(891,476,981,494)"},{“FieldName”:“Variety”,“Value”:“TSL”,“ConfidenceLevel”:100.0,“Coordinate”:"(762,449,796,463)"}]}],“ResultCode”:0.0,“ResultMessage”:“Document is ready.”}

I want to store the values present in the ‘Fields’.Eg: variable1 = NAVIOS UNISON …
How can I parse through them?

Can someone help me out with this, as I am stuck on this for along time now.

You can covert that json data to custom object after that you can ready using custom object.

Kindly refer the following code and also following article:

Invoke web service and store resulted response in excel file Tutorials/Guides

Folder.GetSpecialFolder SpecialFolder:Folder.SpecialFolder.DesktopDirectory SpecialFolderPath=> SpecialFolderPath #Invoke web service Web.InvokeWebService URL:“http://api.geonames.org/wikipediaSearchJSON?formatted=true&q=bangalore&maxRows=10&username=sk12te&style=full” Method:Web.Method.Get Accept:‘application/json’ contentType:‘application/json’ CustomHeaders:’’ RequestBody:’’ ConnectionTimeout:30 FollowRedirection:True ClearCookies:False FailOnErrorStatus:False EncodeRequ…

Variables.ConvertJsonToCustomObject
Json: WebServiceResponse CustomObject=> JsonAsCustomObject

1 Like