Issue to get value from json file

I having an issue to read and get value from json file.
I need to get the value for all info under IndexFields

sample json file as below.

{“Invoice”: {
“IndexFields”: {
“amount”: “1,19 7.00”,
“description”: “abc" 1 PLY”,
“invoice_date”: “18/01/2019”,
“invoice_no”: “052108”,
“invoice_to”: “123 pTD”,
“po_number”: “104321”,
“quantity”: “35”,
“unit_price”: “34.20”
},
“PDFLocation”: “C:/Ephesoft/SharedFolders/final-drop-folder/CustomExport/BI9_Invoice_DOC1.pdf”,
“TableData”: “”
}}

Attached sample xml file which i got error message “System.NullReferenceException: Object reference not set to an instance of an object.”

Main.xaml (11.6 KB)

Hi,
1/ The double quotes in your example are not valid. It should be " = char(34)
2/ To get e.g. “amount” use the following statement YourJsonObject(“Invoice”)(“IndexFields”)(“amount”)

Cheers

Hi J0ska,

I’m not clear, can you give me sample xml file.

Thank you
Regards

Hi J0ska,

Manage to get the value based on your command above.
I have another question how can I loop if the info repeating but having another value.

Thank you
Regards
Jamuri

Hi,
A simple example, for reference for others.
json.zip (1.9 KB)

Cheers

Hi,
Could you supply sample of such Json with repeating info. Preferably as attachment.

Cheers