Need to read all values from attached JSON text file

json.txt (4.3 KB)

I have the attached JSON file. I need to extract the folder path, rename value, File Type and File Directory info from this.

Can some one please help me with this?

I’m not much of an expert in processing JSON, but I know your starting point will be reading the file into a string variable, and using the UiPath.WebAPI package - it has JSON processing activities and functions in it - parse the JSON string into a JSON object. From there, hopefully someone can help you with the exact way to reference the JSON values.

{
   "Contract #":"2032H5-19-F-00291",
   "Mod #":"P00001",
   "Contract Type":"MOD",
   "{\"Contract #\": \"2032H5-19-F-00291\",\"Mod #\": \"P00001\",\"Contract Type\": \"MOD\",\"2032H5-20-F-00291_P00001 Modification Summary.pdf\": {\"Rename to\": \"File Name does not contain any key words identified to rename\",\"File Type\": \"\",\"File Directory\": \"\"},\"2032H5-20-F-00291_P00001 OY1.pdf\": {\"Rename to\": \"File Name does not contain any key words identified to rename\",\"File Type\": \"\",\"File Directory\": \"\"},\"508 5000097360.pdf\": {\"Rename to\": \"508 5000097360.pdf\",\"File Type\": \"Misc\",\"File Directory\": \"\"},\"933678708_EntityRegistrationDetails.pdf\": {\"Rename to\": \"2032H5-19-F-00291_P00001_MOD_Section1_Tab21_entityregistrationdetails.pdf\",\"File Type\": \"Tab21\",\"File Directory\": \"\"},\"933678708_FapiisDetails.pdf\": {\"Rename to\": \"2032H5-19-F-00291_P00001_MOD_Section1_Tab21_fapiis.pdf\",\"File Type\": \"Tab21\",\"File Directory\": \"\"},\"933678708_RecordDetails.png\": {\"Rename to\": \"2032H5-19-F-00291_P00001_MOD_Section1_Tab21_recorddetails.png\",\"File Type\": \"Tab21\",\"File Directory\": \"\"},\"933678708_RepsandCerts.pdf\": {\"Rename to\": \"File Name does not contain any key words identified to rename\",\"File Type\": \"\",\"File Directory\": \"\"},\"ChkLst_BPA DO TO_June2019 MODIFICATIONS.rtf\": {\"Rename to\": \"ChkLst_BPA DO TO_June2019 MODIFICATIONS.rtf\",\"File Type\": \"Misc\",\"File Directory\": \"\"},\"Determination of Responsibility form.docx\": {\"Rename to\": \"File Name does not contain any key words identified to rename\",\"File Type\": \"\",\"File Directory\": \"\"},\"EIT 5000097360.pdf\": {\"Rename to\": \"EIT 5000097360.pdf\",\"File Type\": \"Misc\",\"File Directory\": \"\"},\"Entity Registration and Exclusions.png\": {\"Rename to\": \"File Name does not contain any key words identified to rename\",\"File Type\": \"\",\"File Directory\": \"\"},\"Form-14775-Security-Compliance-Review-Checklist-for-IT-Acquisitions (007).pdf\": {\"Rename to\": \"Form-14775-Security-Compliance-Review-Checklist-for-IT-Acquisitions (007).pdf\",\"File Type\": \"Misc\",\"File Directory\": \"\"},\"FPDS-NG 2032H5-20-F-00291 P00001.pdf\": {\"Rename to\": \"2032H5-19-F-00291_P00001_MOD_Section1_Tab16_fpds.pdf\",\"File Type\": \"Tab16\",\"File Directory\": \"\"},\"I_1 SC_5000097360.pdf\": {\"Rename to\": \"File Name does not contain any key words identified to rename\",\"File Type\": \"\",\"File Directory\": \"\"},\"I_1 SC_FMS Funding Information - 97360.xlsx\": {\"Rename to\": \"File Name does not contain any key words identified to rename\",\"File Type\": \"\",\"File Directory\": \"\"},\"Letter of Intent 2032H5-20-F-00291 OY1.pdf\": {\"Rename to\": \"File Name does not contain any key words identified to rename\",\"File Type\": \"\",\"File Directory\": \"\"},\"MOD LOG SUMMARY 2032H5-20-F-00291doc.doc\": {\"Rename to\": \"MOD LOG SUMMARY 2032H5-20-F-00291doc.doc\",\"File Type\": \"Misc\",\"File Directory\": \"\"},\"Option Exercise Memo- 2032H5-20-F-00291.docx\": {\"Rename to\": \"File Name does not contain any key words identified to rename\",\"File Type\": \"\",\"File Directory\": \"\"},\"Red River Quote.xlsx\": {\"Rename to\": \"2032H5-19-F-00291_P00001_MOD_Section1_Tab5_quote.xlsx\",\"File Type\": \"Tab5\",\"File Directory\": \"\"},\"req comment.doc\": {\"Rename to\": \"File Name does not contain any key words identified to rename\",\"File Type\": \"\",\"File Directory\": \"\"},\"Req# 50000973600-000 - APPROVED - 05182020.msg\": {\"Rename to\": \"File Name does not contain any key words identified to rename\",\"File Type\": \"\",\"File Directory\": \"\"},\"Security Compliance Review Checklist for IT Acquisitions Approval 5000097360.msg\": {\"Rename to\": \"Security Compliance Review Checklist for IT Acquisitions Approval 5000097360.msg\",\"File Type\": \"Misc\",\"File Directory\": \"\"},\"SF 1026 - Determine to exercise an Option.pdf\": {\"Rename to\": \"2032H5-19-F-00291_P00001_MOD_Section1_Tab10_sf1026.pdf\",\"File Type\": \"Tab10\",\"File Directory\": \"\"},\"VPAT DD SW 6.x.pdf\": {\"Rename to\": \"VPAT DD SW 6.x.pdf\",\"File Type\": \"Misc\",\"File Directory\": \"\"} }":{
      "Rename to":"2032H5-19-F-00291_P00001_MOD_Section1_Tab1_pr.pdf\",\"File Type\": \"Misc\",\"File Directory\": \"\"} }",
      "File Type":"pr",
      "File Directory":""
   }
}

Also, I think something is wrong with this JSON file. There’s like a nested repetition of the object, multiple levels deep before you get to the values. I suggest looking at the source of this file and improving the format.

1 Like

I tried this but I am not able to parse through it. @ppr

Tried what? Show us your code.

JP_JOList_Get0_SpecPrp_Val2.xaml (20.8 KB)
(21.1 KB)
@postwick Please find attached my code. Could you check and let me know how to get all the values

Can some one help me with this?

This output was a errored out Json.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.