how to trim comma at the end in html jsreport
-
Hi,
can you help me how to trim the comma ? i tried with trim method ,but jsreport says that trim is not defined as a function!
thanks in advance!
-
Please create a tiny, minimal playground demo replicating the problem. Thank you
https://playground.jsreport.net/
-
https://playground.jsreport.net/w/anon/YfaHjbOd
you can check !!
-
I don't see trim would be actually called in the demo. What am I missing?
-
@sarasura just change your helper a bit, you need something like this
<td>{{getNamesWithKomma CorrespondenceParties}}</td>
function getNamesWithKomma(names){ return names.map((i) => i.Name).join(', '); }
live demo of it here
-
Hi,
thanks for the reply, i too tried map before and also tried your code ,but below is the result!
Do i have install any thrid party helper ?
-
Hi,
Now its working fine, understood the way how to pass the json object
Thanks for the great support :)