Prova cosi
if (data.risposta == 1) sicuro che ti serva un array? L'alert risponde quello che vuoi?