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

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -