While running the below code, i am getting Unable to cast object of type ‘Newtonsoft.Json.Linq.JProperty’ to type ‘Newtonsoft.Json.Linq.JObject’ error. Please suggest hot to resolve the issue.DataExtraction - ML Extractor(Updated).zip (99.3 KB)
Hi @Anamika15,
Could you please try by changing for each object type to “Newtonsoft.Json.Linq.JToken” and use item.ToString instead of item(“DocumentId”).ToString.
Changing object type to “Newtonsoft.Json.Linq.JToken” is partially solving the issue. Now I am not getting error but its giving me complete JSON file in message box.
I need few elements only. Document id, invoice id etc. Any idea how to get this?