javascript - Ajax result is not an object -


My AJAX result is

  ["1", "O"]   

I'm trying to reach 1, but

  console.log (Results [0]);   

gives me

'['

How can I make it as an object and Can I already get the element of my array result?

Try it that you are listed in the string of your result

  var resultObj = JSON.parse (results); Console.log (resultsObj [0]);    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -