Ver Mensaje Individual
  #5 (permalink)  
Antiguo 13/09/2012, 17:17
Programadorpollo
 
Fecha de Ingreso: septiembre-2012
Mensajes: 33
Antigüedad: 12 años, 2 meses
Puntos: 1
Respuesta: Select con AJAX

Eso es lo que quiero que devuelva pero mira lo que pasa:

Voy a imprimir el console.log(resp)

console.log(resp) = {"0":"150008","char_id":"150008","1":"2000012","ac count_id":"2000012","2":"9","char_num":"9","3":"Gm pollo","name":"Gmpollo","4":"0","class":"0","5":"1 ","base_level":"1","6":"1","job_level":"1","7":"0" ,"base_exp":"0","8":"0","job_exp":"0","9":"210000" ,"zeny":"210000","10":"5","str":"5","11":"5","agi" :"5","12":"5","vit":"5","13":"5","int":"5","14":"5 ","dex":"5","15":"5","luk":"5","16":"42","max_hp": "42","17":"42","hp":"42","18":"11","max_sp":"11"," 19":"11","sp":"11","20":"0","status_point":"0","21 ":"0","skill_point":"0","22":"0","option":"0","23" :"0","karma":"0","24":"0","manner":"0","25":"0","p arty_id":"0","26":"0","guild_id":"0","27":"0","pet _id":"0","28":"0","homun_id":"0","29":"1","hair":" 1","30":"0","hair_color":"0","31":"0","clothes_col or":"0","32":"0","weapon":"0","33":"0","shield":"0 ","34":"0","head_top":"0","35":"0","head_mid":"0", "36":"0","head_bottom":"0","37":"0","robe":"0","38 ":"prontera","last_map":"prontera","39":"155","las t_x":"155","40":"182","last_y":"182","41":"pronter a","save_map":"prontera","42":"155","save_x":"155" ,"43":"182","save_y":"182","44":"0","partner_id":" 0","45":"0","online":"0","46":"0","father":"0","47 ":"0","mother":"0","48":"0","child":"0","49":"0"," fame":"0","50":"0","rename":"0","51":"0","delete_d ate":"0"}


Me vota todos los datos, pero si imprimo el console.log(resp.name).

console.log(resp.name); = undefined.


Y como te das cuenta deberia imprimir: "Gmpollo"

No se la verdad como arreglarlo :s, se supone que si escribo resp.name, el json deberia devolver "Gmpollo" ya que name = "Gmpollo"

Pero no me anda, me manda undefined.