Below is my AJAX call response JSON ---
jsonObj = {
"name": "Top 5 Retail Sales - May 2017 - US",
"rows": [
"{\"dealershipName\":\"VIJAY ROAD EQUIPMENT, INC.\",\"numberofUnits\":\"20\",\"salesRepName\":\"DAVE HOLZWARTH\"}",
"{\"dealershipName\":\"GRAND TRAVERSE DIESEL SERVICE, INC.\",\"numberofUnits\":\"13\",\"salesRepName\":\"DANIEL WALTERS\"}",
"{\"dealershipName\":\"BUCKEYE WESTERN STAR\",\"numberofUnits\":\"12\",\"salesRepName\":\"BRANDON CREEK\"}",
"{\"dealershipName\":\"FREIGHTLINER NORTHWEST \",\"numberofUnits\":\"11\",\"salesRepName\":\"LARRY PARROTT\"}",
"{\"dealershipName\":\"MIDWAY WESTERN STAR\",\"numberofUnits\":\"11\",\"salesRepName\":\"MIKE GOEBEL\"}",
"{\"dealershipName\":\"TRUCK COUNTRY OF IOWA, INC.\",\"numberofUnits\":\"11\",\"salesRepName\":\"JASON NOONAN\"}",
"{\"dealershipName\":\"FRESNO TRUCK CENTER\",\"numberofUnits\":\"9\",\"salesRepName\":\"LEE HOWARD\"}",
"{\"dealershipName\":\"WICK'S STERLING TRUCKS, INC.\",\"numberofUnits\":\"9\",\"salesRepName\":\"TERRY NOVOTNY\"}"
],
"country": "US",
"segment": "All"
}
I want to load rows element into HTML table thru jquery
HTML -
<table>
<tbody>
<tr class="tableHeader">
<th>SALES REP</th>
<th>DEALERSHIP</th>
<th>UNITS</th>
</tr>
<div data-sly-list.row="${retailSalesUse.retailSales.rows}" data-sly-unwrap>
<tr class="${row.rowClass}">
<td>${row.sales}</td>
<td>${row.dealership}</td>
<td class="numericField">${row.units}</td>
</tr>
</div>
</tbody>
</table>
Please suggest how to load the JSON data in HTML table rows