Good morning
How do I compare the content of two maps which will both contain an ID and a date. I wish to extract the ID and value if they differ.
example:
Map 1 - 501,2020-07-20 19:21:27.2498612, 536,2020-07-20 19:21:46.2499061, 8000,2020-07-22 20:48:29.7426884, 8001,2020-07-23 07:05:01.451
Map 2 - 501,2020-07-20 19:21:27.2498612, 536,2020-07-20 19:21:46.2499061, 8000,2020-07-22 20:48:29.7426884, 8001,2020-07-23 09:44:59.148
I have tried to use map.containskey by looping through the values as below, but not having much success
Any help as usual would be appreciated.
Cheers
Mark
How do I compare the content of two maps which will both contain an ID and a date. I wish to extract the ID and value if they differ.
example:
Map 1 - 501,2020-07-20 19:21:27.2498612, 536,2020-07-20 19:21:46.2499061, 8000,2020-07-22 20:48:29.7426884, 8001,2020-07-23 07:05:01.451
Map 2 - 501,2020-07-20 19:21:27.2498612, 536,2020-07-20 19:21:46.2499061, 8000,2020-07-22 20:48:29.7426884, 8001,2020-07-23 09:44:59.148
I have tried to use map.containskey by looping through the values as below, but not having much success
B4X:
dim t as int = 0
For Each k As String In bMap.Values
Dim v As String = bMap.Get(k)
If aMap.ContainsKey(v) Then
'this is the same key
'Log("Same key found")
Log(v)
Else
t=t+1
Log("Different key: " & k & "-" & v)
End If
Next
Any help as usual would be appreciated.
Cheers
Mark