Each time I call vm.get_map_count() I get random number like Some(712005920) but I am expecting 1 as value, because the value is expected to be {"sum": 3}
I have a wren class like this
class Component {
static process(input){
if(input["left"] != null && input["right"] != null){
var sum = input["left"] + input["right"]
var result = {"sum": sum}
my_foreign_api.send(result) // send result to rust backend
}
}
}
fn send(vm: &VM) {
let count = vm.get_map_count();
println!("{:?}", count); // <= I need to know the size of the map
}
Each time I call
vm.get_map_count()
I get random number likeSome(712005920)
but I am expecting1
as value, because the value is expected to be{"sum": 3}
I have a wren class like this