Good afternoon I have a problem with JSON and I do not know how to correct
I call the function in this way
function mostrar(idgrado){
$.post("../ajax/grados.php?op=mostrar",{idgrado:idgrado}, function(data,status){
data= JSON.parse(data);
mostrarfomr(true);
$("#nombregrado").val(data.nombregrado);
$("#idgrado").val(data.idgrado);
})
}
The data comes from an sql query