JSFiddle - React, Tailwind, and code Playground
HTML
<div id="main" />
JavaScript
function Zork(name) {
this.name = name;
}
Zork.prototype.serialize = function () {
return 'This is ' + this.name;
}
var arr = [new Zork('Boris'), new Zork('Doris')];
var json = arr.map(Function.call, Zork.prototype.serialize);
// show result of json
$('#main').html(json.join('<br/>'));