Note : Using only pure JS, no addons, please provide a sample example
Sample data js file content -
var TABLE_DATA = [
{
"id": "5",
"name": "cony #5",
"thumbnailUrl": "image/5.gif",
"price": 170
},
{
"id": "1",
"name": "cony #1",
"thumbnailUrl": "image/1.gif",
"price": 170
},
{
"id": "2",
"name": "cony #2",
"thumbnailUrl": "image/2.gif",
"price": 270
},
{
"id": "8",
"name": "cony #8",
"thumbnailUrl": "image/8.gif",
"price": 70
},
{
"id": "10",
"name": "<img onerror='window.document.body.innerHTML = \"<h1>XSS</h1>\";' src=''> ",
"thumbnailUrl": "image/10.gif",
"price": 170
},
{
"id": "4",
"name": "cony #4",
"thumbnailUrl": "image/4.gif",
"price": 150
},
{
"id": "3",
"name": "cony #3",
"thumbnailUrl": "image/3.gif",
"price": 130
},
{
"id": "6",
"name": "cony #6",
"thumbnailUrl": "image/6.gif",
"price": 160
},
{
"id": "9",
"name": "cony #9",
"thumbnailUrl": "image/9.gif",
"price": 170
},
{
"id": "7",
"name": "cony #7",
"thumbnailUrl": "image/7.gif",
"price": 170
}
]