JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<div id="dvPromotion">
</div>
JavaScript
$.ajax({
url: 'https://api.myjson.com/bins/1mkxw',
method: "GET",
headers: { "Accept": "application/json; odata=verbose" },
async: false,
success: function (data) {
let html;
$.each(data.results, function (i, item) {
html += '<div class="tileBlock"><img src="/PublishingImages/' + item.Title + '" alt="' + item.To.Title + '" /><br>';
html += '<div class="blockCol1 greyLabel">' + item.To.Title + '</div><div class="blockCol2 fareTxt">' + item.Cost + ' ' + item.From.Currency + '</div><div style="clear: both;"></div>';
html += '<div class=" blockCol3 smallTxt">' + item.Class + ' | ' + item.Trip + '</div><br><div style="clear: both;"></div>';
html += '<div class="btnHolder"><input name="button" class="btn-finder" type="button" data-item="' + encodeURIComponent(JSON.stringify(item)) + '")" class="searchBtn wth150" href="#" value="Book now" /></div></div>';
});
$("#dvPromotion").empty();
$("#dvPromotion").html(html);
}
});
// Attach an event listener to the document element (or any other parent element of your buttons)
$(document).on('click', '.btn-finder', function() {
console.dir(JSON.parse(decodeURIComponent($(this).data('item'))));
});