func getMap() map[string]interface{} { return map[string]interface{}{ "name": "Alice", "age": 30, } }
ot := otto.New() ot.Set("map", getMap())
console.log(map.name); // "Alice" console.log(map.age); // 30This is just one example of how we can use the Value Export feature of the Otto package library. It allows us to seamlessly integrate Go and JavaScript code, making it easy to build applications with complex functionality.