javascript - How to parse or loop this -


i have tried can think of data cannot figure out.

the data in structure this:

[{"code":1000,"day":"sunny","night":"clear","icon":113,"languages": [{"lang_name":"arabic","lang_iso":"ar","day_text":"مشمس","night_text":"صافي"}]  }] 

i've tried looping, using key:value using dot notation , bracket notation , cannot info.

i'm trying "languages" can parse them weather.

var arr = [{"code":1000,"day":"sunny","night":"clear","icon":113,"languages":  [{"lang_name":"arabic","lang_iso":"ar","day_text":"مشمس","night_text":"صافي"}]  }]    arr.foreach(function(obj){ //loop array    obj.languages.foreach(function(language) { //loop languages      console.log(language); //language object      console.log(language.lang_name); //language property    });  });


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -