ListBox with JSON data - Delphi mobile

0

I have this data JSON which returns from a webservice query:

[{
    "id":"1",
    "usuario":"teste",
    "senha":"teste",
    "chave":"d59876jh",
    "email":"[email protected]"
}]

I need to popularize the Items of a ListBox with them.

Does anyone know how to do it?

    
asked by anonymous 05.11.2016 / 02:01

1 answer

-1

var
  i: Integer;
  oListBoxItem: TListBoxItem;
begin
  ListBox1.BeginUpdate;
  for i := 0 to 5-1 do
  begin
    oListBoxItem := TListBoxItem.Create(ListBox1);
    oListBoxItem.Text := 'Stack';
    oListBoxItem.ItemData.Accessory := TListBoxItemData.TAccessory(1);
    ListBox1.AddObject(oListBoxItem);
  end;
  ListBox1.EndUpdate;
end;
    
09.11.2016 / 02:21