Skip to main content

Posts

Showing posts with the label syntax-error

Uncaught type error : Cannot read value "name" of undefined

Actually I am having a global JSON, when I am trying to parse its value in loop, it is showing me error "uncaught type error : Cannot read value 'name' of undefined". I have tried a lot but I am still not able to figure out any solution for it. $(document).ready(function(){ var productJSON = [ {id:"1001",name:"Hopper1",image:"images/290161k.jpg"}, {id:"1002",name:"Hopper2",image:"images/290161k.jpg"}, {id:"1003",name:"Hopper3",image:"images/290161k.jpg"}, {id:"1004",name:"Hopper4",image:"images/290161k.jpg"}, {id:"1005",name:"Hopper5",image:"images/290161k.jpg"}, {id:"1006",name:"Hopper6",image:"images/290161k.jpg"}, {id:"1007",name:"H