Closed gus2286 closed 1 year ago
Hello,
I'm want to say thank you to all of you for making this package, I love it.
I want to ask if you can help me to see what I'm doing wrong with this:
I have a struct with array:
type MessageType struct { TypeMessage string `json:"TypeMessage"` Field [130]string `json:"Field"` } var MsgOUT MessageType
After that I set the value to be used on the VM:
vm := otto.New() errSet := vm.Set("MSG_OUT", &MsgOUT)
JS code:
MSG_OUT.TypeMessage = 'something'; MSG_OUT.Field[1] = '60'; MSG_OUT.Field[2] = 'PEPE';
If I make a console.log inside the JS the 'MSG_OUT.TypeMessage' is correct seted, but the array doesn't is still empty 'MSG_OUT.Field[1]'.
What I'm doing wrong?
Thank you very much Cheers
Hello,
I'm want to say thank you to all of you for making this package, I love it.
I want to ask if you can help me to see what I'm doing wrong with this:
I have a struct with array:
After that I set the value to be used on the VM:
JS code:
If I make a console.log inside the JS the 'MSG_OUT.TypeMessage' is correct seted, but the array doesn't is still empty 'MSG_OUT.Field[1]'.
What I'm doing wrong?
Thank you very much Cheers