You are on the right lines, but a custom type and a Map are quite different. To use database terminology, a custom type is equivalent to a record and the variables within it are fields. For example ...
Type track (title As String, artist As String, album As String, duration as int)
If you add several of these objects to a List then the list is equivalent to a database table. In B4X you can easily sort a list (table) based on a field value ...
Dim tracklist As List
tracklist.Add(aTrack) ' "aTrack" is a track object
tracklist.Add(...)
tracklist.Add(...)
... ...
tracklist.SortType("artist", True)
If you want to retrieve records from a List then you can use something like this ...
Sub selectArtist(name As String) As List
Dim result As List
result.Initialize
For Each t As track In tracklist
If (t.artist = name) Then result.Add(t)
Next
Return result ' List of track objects with "artist = name"
End Sub
A Map, in this context, is a keyed table. The values would be "track" objects. The keys are often one of the field values, but they need to be unique. That might not be possible in the current example, but maybe ...
Dim library As Map
Dim t As track
t.title = "Mona"
t.artist = "Rolling Stones"
t.album = "Now!"
t.duration = 235
library.Put(t.title, t)
. . . .
. . . .
t = library.Get("Mona")
Now you can retrieve complete track data based on a track title, like a simple database query. It is faster than scanning a list.
You are getting your data from a JSON file. I haven't used JSON in B4A but a JSONParser will directly generate a Map of key:value pairs. That might be helpful, although I think that I would organise the data into larger objects as you seem to be doing.
I hope that I have helped. Sorry if I have explained some stuff that you already know. Ask again if I have not been clear.