I need to write some code to retrieve data from a JSON string that my application will receive from a web site.
This is the JSON string.
{
"client" :
{
"Name" : "john doe",
"Phone" : 12345678,
"Address": "5th av",
},
"order" : [
{
"Code" : 101,
"Quantity" : 1,
"Cost": 10.50,
"Coment" : ""
},
{
"Code" : 102,
"Quantity" : 3,
"Cost": 8.50,
"Coment" : ""
},
{
"Code" : 103,
"Quantity" : 1,
"Cost": 21.50,
"Coment" : ""
}
]
}
I am getting very confused about how to read pairs and arrays. I've tried lots of code posted here and other forums, but I still cannot get it done.
Can anyone give me some hints to get it done? I am using XE5 and JSON units.