Here is a sample dataset
"timestamps_int": {
"23": [
20170820235522,
20170820235022,
20170820234522,
20170820234022,
20170820233522,
20170820233022,
20170820232522,
20170820232022,
20170820231522,
20170820231022,
20170820230522,
20170820230022
],
"22": [
20170820225522,
20170820225022,
20170820224522,
20170820224022,
20170820223522,
20170820223022,
20170820222522,
20170820222022,
20170820221522,
20170820221022,
20170820220522,
20170820220022
],
"21": [
20170820215522,
20170820215022,
20170820214522,
20170820214022,
20170820213522,
20170820213022,
20170820212522,
20170820212022,
20170820211522,
20170820211022,
20170820210522,
20170820210022
],
If I use the following code
// create from string
jData := GetJSON(memo1.text);
// output as a flat string
s := jData.AsJSON;
// output as nicely formatted JSON
s := jData.FormatJSON;
// cast as TJSONObject to make access easier
jObject := TJSONObject(jData);
s := jData.FindPath('timestamps_int.23[1]').AsString;
showmessage(s);
This will get me what I want if I know the hour I want is 23...
What I want to get though is to tell it something like this..
s := jData.FindPath('timestamps_int.[1][1]').AsString;
Instead of telling it 23[1] I want to say grab the first hour in the object and grab the first element from that array.. Does that make sense? Is there a way to do that?