JSFiddle - React, Tailwind, and code Playground
JavaScript
var mywindow = window.open();
testArray = [1, 2, 3];
var myUrl = "/echo/json/";
$.ajax({
type: "POST",
url: myUrl,
dataType: "json",
data: {
json: JSON.stringify({
images: testArray
})
},
success: function (data) {
console.log('success');
//alert(data);
mywindow.document.body.innerHTML = '<pre>' + data.images + '</pre>';
}
});