<< Click to Display Table of Contents >> Navigation: JSON > Navigation |
To get node by its name/path use square brackets. Examples:
E := JS['result'];
E := JS['result[0].name'];
E := JS['result[0].product.id'];
For object and array nodes its child node can be obtained by index using [], Items[], Pairs[]
for i := 0 to JS.Count - 1 do
E := JS[i];
E := JS['result'].Items[2];
But faster way is to use First and Next properties:
E := JS.First;
while Assigned(E) do
begin
..
E := E.Next;
end;
Also there is JSONPath support.