Sending an array from C# to lua?

I’m trying to build a menu using warmenu. I’d like to populate the menu options from a C# script I’m building. I have exported a function that the lua script calls, but can’t for the life of me figure out a way to format the data for the LUA component.

Items are stored in List<> container, is there a way I can encode/decode the data to be sent to the LUA component?

Any help would be greatly appreciated, I’m new to this whole LUA language =(.

Maybe trigger a lua client event from the c# script, I am not sure if it’s possible but it should be I guess.

Messagepack does that automatically for you and should convert List / Dict / Array to tables.

Thank you sir, took a little messing around, but it’s working =).