Zoho Deluge: Convert Map to HTML Table without a FOR loop
- Joel Lipman
- Zoho
- Hits: 5525
A very quick article on converting a Map string into a HTML table without using a for each loop.
Why?
I have quite a big response from our CRM that hits a statement execution limit if I use a for loop. I have a map with 3 columns: first_name, last_name, and ID. What I want is a HTML table now with the headers and data but without using a for loop.
What I have:
{"First_Name":"Joel","Last_Name":"Lipman","id":"1"},{"First_Name":"Another","Last_Name":"Person","id":"2"}
- {"First_Name":"Joel","Last_Name":"Lipman","id":"1"},{"First_Name":"Another","Last_Name":"Person","id":"2"}
First Name | Last Name | ID |
---|---|---|
Joel | Lipman | 1 |
Another | Person | 2 |
How?
This is a bit of a dirty solution and as long as "id" is not your first column (because "id" can be found in names like "David") it will work.