nim-mustache icon indicating copy to clipboard operation
nim-mustache copied to clipboard

Having problem in sending data

Open AritraBanik08 opened this issue 1 year ago • 1 comments

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.

AritraBanik08 avatar Sep 17 '23 17:09 AritraBanik08

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.

pietroppeter avatar Sep 26 '23 13:09 pietroppeter