JSFiddle - React, Tailwind, and code Playground

HTML

<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.22/jquery-ui.min.js"></script>
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.22/themes/base/jquery-ui.css">
<div id="form">
    <h1>Blah</h1>
</div>

<button id="array-test">Array Test</button>
<button id="object-test">Object Test</button>

JavaScript

if ( $.attrFn ) { $.attrFn.text = true; }

var $form = $('#form'),
    $arrTest = $('#array-test'),
    $objTest = $('#object-test');

$arrTest.click(function(){
    $form.dialog({
        buttons: [
            {
                text: 'Cancel'                
            },
            {
                text: 'Save'
            }
        ]
    });
});

$objTest.click(function(){
    $form.dialog({
        buttons: {
            'Cancel': function () {},
            'Save': function () {}
        }
    });
});