json - Jquery receiving return value from $.post as array -


I have read many threads about it and still it is not working, but actually got passed i jquery My database will return a record: $ row ['parcel_id]' ' and $ row [' address] , just 2 columns, Which is then json_encode () .

json is encoded using

data in my query return. I have something like this:

  var arr = $ .parseJSON (data); Warning (data); This return:  
  {"parcel_id": "1", "address": "5000 Charlotte Avenue"}  

However I can not

  data.parcel_id or data ['parcel_id']  

So my question is, what is the return value is? Is this an array? Objection? How can I use each element?

Since you have arr , you have to:

  arr.parcel_id  

or

  arr [parcel_id] ']  

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -