reading JSON file
Hi Guys,
I'm using the below so I can put JSON file in an object and read each property:
d ##class(%ZEN.Auxiliary.jsonProvider).%ConvertJSONToObject(JSONString3,,.list)
S Job= list.jobGUID
but because the JSON starts and ends with [ ] my list is empty, and I had to remove them to get a good list.
So is there a way that I can handle this which having me removing those brackets each time, because I thought %ConvertJSONToObject to be able to handle this anyway?
FYI I'm running Ensemble 2014
[{"routeGuid":"531318d8-9967-445a-ae42-14e04244e0fb","sensorType":"MEMS TRIAXIAL","startDateTime":"2022-05-20T23:04:51.159Z","myProperty":0,"callbackHost":"https://vibra-api-dev.azurewebsites.net/api/sensors/vibration","collectionQuantity":1,"collectionInterval":0,"collectionTimeout":28140,"locationName":"Test Plant 1","locationGuid":"286c2dac-597d-41b0-8f6e-55f19fce9a9e","sensors":[{"equipmentName":"TestAsset 1","equipmentGuid":"ca62ff12-37fe-47a3-a315-95a4c011d835","componentName":"TestMOTORComponent 1","componentGuid":"3a291bf6-1ffd-4e14-b265-4b973c7660df","jobGUID":"0b955ee7-9a54-4b13-9af1-7019721faeab","sensorId":"MY0088","sampleRate":5000,"numberOfSamples":30000}]
Thanks