I am creating html table using json data and my transform is giving for each record a separate table.
var data=[{"name":"aa","mid":"12345","user":"a123","password":"a@123"},{"name":"bb","mid":"2345","user":"b123","password":"b@123"}]
var transform=[
{"<>":"style","html":"table,th,td {border: 1px solid black;border-collapse: collapse;}th {text-align: left;}"},
{"<>":"p","html":"Dear client"},
{"<>":"p","html":"Please find below merchant users passwords are expired. Kindly take necessaray action immediately."},
{"<>":"table","style":"width:100%","html":[
{"<>":"tbody","html":[
{"<>":"tr","html":[
{"<>":"th","id":"name","html":"Client Name"},
{"<>":"th","id":"mid","html":"MID Number"},
{"<>":"th","id":"username","html":"Username"},
{"<>":"th","id":"password","html":"Current Password"}
]},
{"<>":"tbody","id":"json-body","html":[
{"<>":"tr","html":[
{"<>":"td","html":"${name}"},
{"<>":"td","html":"${mid}"},
{"<>":"td","html":"${user}"},
{"<>":"td","html":"${password}"}
]},
]},
]},
]},
{"<>":"p","html":"Thanks & Regards"},
{"<>":"p","html":"[email protected]"}
]
How can I do this by getting all my data into a single html table?
