jquery - Javascript & Nested JSON issues -


so i'm trying put json , parse out jquery doing wrong json syntax. tried running through validator doesn't tell me i'm doing wrong. can point out error of ways?

var searchresults = [ {     "providerlisting": [     {         "nametitle": "cory m spears, md, facp",         "caretype": "internal medicine",         "preferredprovider": true,         "address1": "289 n. highland ave.",         "address2": "",         "citystatezip": "atlanta, ga 30306",         "coverage": "/images/example.png",         "status": "out of network",         "psn": "",         "dcontact": "urlhere",         "save": "urlhere",         "rating": "urlhere",     },     {         "nametitle": "jimmy dean, md, facp",         "caretype": "external medicine",         "preferredprovider": false,         "address1": "3 piedmont rd.",         "address2": "",         "citystatezip": "atlanta, ga 30706",         "coverage": "/images/example2.png",         "status": "in network",         "psn": "urlhere",         "dcontact": "urlhere",         "save": "urlhere",         "rating": "urlhere",     },     {         "nametitle": "john doe, dd, pm",         "caretype": "internal medicine",         "preferredprovider": true,         "address1": "500 ponce de leon ave",         "address2": "suite 5",         "citystatezip": "atlanta, ga 30706",         "coverage": "/images/example2.png",         "status": "out of network",         "psn": "urlhere",         "dcontact": "urlhere",         "save": "urlhere",         "rating": "urlhere",     }] }, { "categories": [{     "categorymenu": [         {             "providertype": [                 {                     "title": "doctor",                     "link": "#doctor",                     "amount": "400"                 },                  {                      "title": "hospital",                      "link": "#hospital",                      "amount": "40"                  },                  {                      "title": "urgent care",                      "link": "#urgentcare",                      "amount": "37"                  }             ]         },         {             "specialty": [                 {                     "title": "allergy , immunology",                     "link": "#allergyandimmunology",                     "amount": "2"                 },                 {                     "title": "audiology",                     "link": "#audiology",                     "amount": "3"                 },                 {                     "title": "allergy , immunology",                     "link": "#allergyandimmunology",                     "amount": "6"                 },                 {                     "title": "ambulatory surgical center",                     "link": "#ambulatorysurgicalcenter",                     "amount": "4"                 }             ]         },         {             "gender": [                 {                     "title": "male",                     "link": "#male",                     "amount": "67"                 },                 {                     "title": "female",                     "link": "#female",                     "amount": "3"                 }             ]         }     }] }]; 

remove , @ end of each

 "rating": "urlhere" 

there ] missing on third last line, below valid json object

var searchresults = [{     "providerlisting": [{         "nametitle": "cory m spears, md, facp",             "caretype": "internal medicine",             "preferredprovider": true,             "address1": "289 n. highland ave.",             "address2": "",             "citystatezip": "atlanta, ga 30306",             "coverage": "/images/example.png",             "status": "out of network",             "psn": "",             "dcontact": "urlhere",             "save": "urlhere",             "rating": "urlhere"     }, {         "nametitle": "jimmy dean, md, facp",             "caretype": "external medicine",             "preferredprovider": false,             "address1": "3 piedmont rd.",             "address2": "",             "citystatezip": "atlanta, ga 30706",             "coverage": "/images/example2.png",             "status": "in network",             "psn": "urlhere",             "dcontact": "urlhere",             "save": "urlhere",             "rating": "urlhere"     }, {         "nametitle": "john doe, dd, pm",             "caretype": "internal medicine",             "preferredprovider": true,             "address1": "500 ponce de leon ave",             "address2": "suite 5",             "citystatezip": "atlanta, ga 30706",             "coverage": "/images/example2.png",             "status": "out of network",             "psn": "urlhere",             "dcontact": "urlhere",             "save": "urlhere",             "rating": "urlhere"     }] }, {     "categories": [{         "categorymenu": [{             "providertype": [{                 "title": "doctor",                     "link": "#doctor",                     "amount": "400"             }, {                 "title": "hospital",                     "link": "#hospital",                     "amount": "40"             }, {                 "title": "urgent care",                     "link": "#urgentcare",                     "amount": "37"             }]         }, {             "specialty": [{                 "title": "allergy , immunology",                     "link": "#allergyandimmunology",                     "amount": "2"             }, {                 "title": "audiology",                     "link": "#audiology",                     "amount": "3"             }, {                 "title": "allergy , immunology",                     "link": "#allergyandimmunology",                     "amount": "6"             }, {                 "title": "ambulatory surgical center",                     "link": "#ambulatorysurgicalcenter",                     "amount": "4"             }]         }, {             "gender": [{                 "title": "male",                     "link": "#male",                     "amount": "67"             }, {                 "title": "female",                     "link": "#female",                     "amount": "3"             }]         }]     }] }]; 

Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -