nim-mustache
nim-mustache copied to clipboard
Having problem in sending data
Row = seq[string]
I have a seq[Row]
variable that I want to send to the mustache template but I don't know how. Can you show me how to send the data to the mustache template and how to show the data in a list.
Thank you for your help as I have just started to use the mustache library.
hi, for custom objects you need to define a custom castValue
procedure to add it to context (and then from context it will end up in the templated). the relevant documentation section is: https://github.com/soasme/nim-mustache#set-arbitrary-objects-in-context
Hope this helps, if not maybe share a reproducible example for the issue you are having.