You can create an event option like the following code.
EventPayload EventPayload.New(table content)¶
ReturnsThe new event payload.Creates a new instance of
EventPayload. The only parameter
contentis the object that needs to be sent. Note: When invoking
FireToServer, the content of
EventPayloadmust be serializable to JSON, that is content must be one of string, number, boolean, table with string keys and table with successive number keys starting from 1.
contentThe object to sent.
ReturnsThe object to send.Get the object to send.