[Lazarus] How to insert item in TJSONObject?
michael.vancanneyt at wisa.be
michael.vancanneyt at wisa.be
Mon Dec 12 11:19:44 CET 2011
On Mon, 12 Dec 2011, silvioprog wrote:
> Hello,
>
> To Add or Delete is very easy:
>
> TJSONObject(FJSONData).Add('Item name', 'Item value');
>
> TJSONObject(FJSONData).Delete(AIndex);
>
> And to Insert?
>
> TJSONObject(FJSONData).Insert(AIndex, 'Item name', 'Item value')? No
> no no... TJSONObject don't implements the method Insert (or Move
> method). :(
The order of elements in a json object is irrelevant.
You should never rely on that. So just add at the end.
Michael.
More information about the Lazarus
mailing list