I would need to get data from inside a JSON Array.
I use a call to WebRequest()
function to get an order list from my db, thru a nodejs(api) and then I got the following JSON-data format e.g:
[{"orderid": 123556,
"ordertype": 0,
"ordercurrency": "EURUSD",
"orderdt": "2016-12-03 03:00:00"
},
{"orderid": 123457,
"ordertype": 0,
"ordercurrency": "GBPUSD",
"orderdt": "2016-12-03 03:15:00"
}
]
Any idea how to transform it to a normal array in order to manage data?
Thank you.
/Koul
JSON Serialization and Deserialization library works pretty well. You can include it and finish your task within a minute or get an inspiration from its code.
https://www.mql5.com/en/code/13663
https://www.mql5.com/en/forum/65320
Let's assume you have the JSON data you pasted in a string variable named data.