[PATCH 3/9] jscript: Iterate through the map in a helper function.