* Added ability to sort TJSONArray

git-svn-id: trunk@32038 -
This commit is contained in:
joost 2015-10-13 14:09:31 +00:00
parent 2152420e4f
commit e388a39e3d

View File

@ -430,6 +430,7 @@ Type
procedure Insert(Index: Integer; AnObject: TJSONObject);
procedure Move(CurIndex, NewIndex: Integer);
Procedure Remove(Item : TJSONData);
Procedure Sort(Compare: TListSortCompare);
// Easy Access Properties.
property Items;default;
Property Types[Index : Integer] : TJSONType Read GetTypes;
@ -2338,6 +2339,11 @@ begin
FList.Remove(Item);
end;
procedure TJSONArray.Sort(Compare: TListSortCompare);
begin
FList.Sort(Compare);
end;
{ TJSONObject }
function TJSONObject.GetArrays(const AName: String): TJSONArray;