'Class Globals
Public mapArtIMGs As B4XOrderedMap
Sub GetArtContent (nid As Int, aUser As String, aPsw As String) As ResumableSub
'Here I read the date time field from the JSON data
Dim CFullDate As String = colchanged.Get("value") '--> this contains "2020-04-26T12:36:07+00:00"
Dim HDate As String = CFullDate.SubString2 (0, 10) '--> In this way I got only the date substring used within the sort
End sub
Public Sub LoadArtList (ArtContent As B4XOrderedMap)
Private lstArt As List = ArtContent.Values
lstArt.SortType("HDate", False) ---> Apply sort on HDate ("2020-04-26")
For i=0 To lstArt.Size-1
'....
mapArtIMGs.Put(target_id, Item)
'....
Next
Return mapArtIMGs
End Sub