Well, I have a code where I get the JSON data, but the display is undefined.
function usuario_search(id){ $.ajax({
type:"GET",
url: "/usuarios/search/"+id,
success: function(data) {
console.log(data);
var json = JSON.parse(data);
console.log(json);
alert(data);
document.getElementById('name').value = json.name;
document.getElementById('email').value = json.email;
document.getElementById('permission').value = json.role;
$('#defaultModal').modal('show');
},
error: function(ts){
$("#error").text(ts.responseText);
}});}
alert with data:
Whatappearsinthemodal:
debugger: