jquery - Json responsed data not display -


i have json response string follows:

[   {     "0":         {           "total":"2.00"         },     "paymentcollection":         {           "emp_id":"e0004"         }   } ] 

and jquery function

$.each(resp,function(indx,obj){     alert(obj.0.total); });  

unfortunately alert not working.. please help

you can access this:

obj['0'].total 

or

obj['0']['total'] 

demo


Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

android - How to create dynamically Fragment pager adapter -

1111. appearing after print sequence - php -