I want to display specific text when the data get from table equal specific value.
example :- if (data[9] = x) { y = 'Text'}
And I want to display it in the span id
Id 01 : Text
$('.example').on('click', function() {
$('#example').modal('show');
$tr = $(this).closest('tr');
var data = $tr.children("td").map(function() {
return $(this).text();
}).get();
// console.log(data);
$('#Id01').html($.trim(data['1']));
$('#Id02').html($.trim(data['2']));
$('#Id03').html($.trim(data['3']));
<p>Id 01 : <span id="Id01"></span></p>
<p>Id 02 : <span id="Id02"></span></p>
<p>Id 03 : <span id="Id03"></span></p>