JSFiddle - React, Tailwind, and code Playground

by sirio3mil

JavaScript

var correct_json = '{"age" : "28","city" : "Madrid, ES","genre" : "male"}';
var incorrect_js = '';
$.ajax({
    type: 'POST',
    url: '/echo/json/',
    dataType: 'json',
    data: {
        'json': incorrect_js 
    },
    success: function(data) {
        $.each(data, function(id, value) {
            alert(id + '=>' + value)
        });
    }
});