JSFiddle - React, Tailwind, and code Playground
CSS
.fa-plus
{
background-color:red;
font:14px;
}
.fa-minus
{
background-color:blue;
font:10px;
}
}
JavaScript
var json = {"items":[{"name":"MP 201SPF_1C","productNo":"123","commerceItemQty":1,"price":"$350.00","leaseOrNot":"false"},{"name":"MP 201SPF_1C","productNo":"456","commerceItemQty":4,"price":"$1,400.00","leaseOrNot":"false"},{"name":"MP 201SPF_1C","productNo":"789","commerceItemQty":4,"price":"$1,400.00","leaseOrNot":"true"}]};
$.each(json.items,function(index,item){
console.log(item);
tr = $('<tr/>');
tr.append("<td><h3>" + item.name + "</h3><p><strong>" + item.productNo + "</strong></p><div>" + item.leaseOrNot + "</div></td>");
tr.append("<td>" + item.commerceItemQty + "</td>"); tr.append("<td>" +item.price + "</td>"); $('table').append(tr);
})