I am wanting to return a list of maps from a library method. I have done the following:
but get an error
Where did I go wrong?
Thanks
B4X:
List nodes = new List();
nodes.Initialize();
for (int i = 0; i < result.getNodes().size(); i++) {
Map node = new Map();
node.Initialize();
Node mNode = result.getNodes().get(i);
node.Put("ID", mNode.getId());
node.Put("DisplayName", mNode.getDisplayName());
nodes.Add(node);
}
but get an error
java.lang.ClassCastException: anywheresoftware.b4a.objects.collections.Map cannot be cast to anywheresoftware.b4a.objects.collections.Map$MyMap
Where did I go wrong?
Thanks