Value of json expression is `undefined`
Author: kennethkleeCreated Dec 12, 2023Updated Dec 13, 2023
When running this, value, _ = vm.Run("{}"), the resultant value is undefined instead of an Object.
Other types work:
value, _ = vm.Run("1")
// value.toString() is 1value, _ = vm.Run("true")
// value.toString() is truevalue, _ = vm.Run("[1, 2, 3]")
// value.toString() is 1, 2, 3As an extension, an error is returned when using { "a": 1 }. Error: (anonymous): Line 1:5 Unexpected token :
Source: robertkrimen/otto