I have tried to fetch data using json, and it worked as I wanted to. But the problem is how can I display it on my page or HTML? what I am getting is [{"name":"Black wall"},{"name":"Green wall"},{"name":"Gray wall"}] so How can I make it formal and just display Black wall, Green wall, Gray wall. Is there a way to do this?
$(function(){
$(".checkBoxClass").on("click", function() {
var data = [];
$("table > tbody > tr").each(function () {
var $tr = $(this);
if ($tr.find(".checkBoxClass").is(":checked")) {
data.push({
name: $tr.find(".name").text(),
});
}
});
console.clear();
var messages = JSON.stringify(data);
console.log(messages);
});
});