This may be coded in a more short form using 10.3.2. First case:
var
JsonValue: TJSONValue;
Branch: string;
begin
JsonValue := TJSONObject.ParseJSONValue(st, False, True);
try
Branch := JsonValue.GetValue<string>('data.conditions[0].temp');
memo1.Lines.add('Parsed temperature '+branch);
Branch := JsonValue.GetValue<string>('data.conditions[2].bar_sea_level');
memo1.Lines.add('Parsed barometer '+branch);
finally
JsonValue.Free;
end;
end;
Second case:
var
JsonValue: TJSONValue;
Branch: string;
begin
JsonValue := TJSONObject.ParseJSONValue(st, False, True);
try
Branch := JsonValue.GetValue<string>('iWN5p2qfRFeGKXn1m3iGnDW0Vkl2.PROFILE.BIRTHDAY');
memo1.Lines.Add('Parsed BIRTHDAY ' + Branch);
Branch := JsonValue.GetValue<string>('iWN5p2qfRFeGKXn1m3iGnDW0Vkl2.PROFILE.FULL NAME');
memo1.Lines.Add('Parsed FULL NAME ' + Branch);
finally
JsonValue.Free;
end;
end;
This is most simple code. Although not fastest, but may be enough fast. Depending on the requirements it may be optimized.