javascript - How to call an array inside an array in JSON -
i hvae json file as
{"years":[ {"year":"2006","projects":[ {"title":"year 10","place":"some school, place","desc":"score - score%"}, {"title":"year 12","place":"some school, place","desc":"score - score%"} ]}, {"year":"2008"}, {"year":"2009"}, {"year":"2010"}, {"year":"2011"}, {"year":"2012"}, {"year":"2013"} ] }
i trying fetch "title":"year 10"
using timeline.years[0].projects[0].title
in javascript
. works way if have single array not array within array. please me correct way write it?
Comments
Post a Comment