Back
Syntax
Study
Editor
Mode:
HTML
CSS
JavaScript
PHP
Reset
Run »
HTML / CSS / JS
$.getJSON("/api/step1") .then(function(data) { if (!data.ok) return $.Deferred().reject("Step 1 failed"); return $.getJSON("/api/step2?id=" + data.id); }) .then(function(result) { render(result); }) .fail(function(err) { showError("Operation failed: " + err); });
Result
Open