I have a JSON Object, let's name it jObject that looks like this:
{
"id": 0,
"data": "[{DAT_INCL: \"08/03/2012 10:07:08\", NUM_ORDE: 1, NUM_ATND: 1, NUM_ACAO: 2, NUM_RESU: 3},
{DAT_INCL: \"08/03/2012 10:07:09\", NUM_ORDE: 2, NUM_ATND: 1, NUM_ACAO: 4, NUM_RESU: 5},
{DAT_INCL: \"08/03/2012 10:07:09\", NUM_ORDE: 3, NUM_ATND: 1, NUM_ACAO: 8, NUM_RESU: NULL}]"
}
As you can see, it contains two pairs, one of which is an array with three objects in this case (the amount of objects is dynamic) with multiple "key: values"(these don't vary, being always the same 5 fields), which I want to insert into an SQL database, "key" being column, "value" being field. Question is, how do I access each object individually?
Code-wise what I did was extract the pair that contained this array by putting it in jPair
jPair := OriginalObject.Get(1);
and then captured the array
jArray:= TJSONArray(jPair.JsonValue);
(Also, as a bonus, when I evaluate jArray.Size, the result is 6226004. What?)