object from List in Javascript -


this question has answer here:

i'm trying call value out list , looks this:

[{     "gesundheitsamtid": 16,     "name": "stadt dortmund",     "telefonenummer": "0231 50-23606",     "email": "gesundheitsamt@dortmund.de",     "adresse": [{         "adresseid": 16,         "strasse": "hövelstr.",         "hausnr": "8",         "ort": "dortmund",         "plz": "44137"     }] }, {     "gesundheitsamtid": 70,     "name": "stadt dortmund",     "telefonenummer": "0231 50-23606",     "email": "gesundheitsamt@dortmund.de",     "adresse": [{         "adresseid": 70,         "strasse": "hövelstr.",         "hausnr": "8",         "ort": "dortmund",         "plz": "44137"     }] }] 

i tried

var obj = ['adresse'][0].ort;  

but said

undefinedtype

const data = [{      "gesundheitsamtid": 16,      "name": "stadt dortmund",      "telefonenummer": "0231 50-23606",      "email": "gesundheitsamt@dortmund.de",      "adresse": [{          "adresseid": 16,          "strasse": "hövelstr.",          "hausnr": "8",          "ort": "dortmund",          "plz": "44137"      }]  }, {      "gesundheitsamtid": 70,      "name": "stadt dortmund",      "telefonenummer": "0231 50-23606",      "email": "gesundheitsamt@dortmund.de",      "adresse": [{          "adresseid": 70,          "strasse": "hövelstr.",          "hausnr": "8",          "ort": "dortmund",          "plz": "44137"      }]  }]    console.log(data[0].adresse[0].ort);


Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -