Javascript JSON parsing - object to array -


while parsing json object, there better way convert single length objects array, because when want run loop using length works arrays fail if length 1 , object (not included in []).

module:{section:{topic:"some topic"}, section:{[{topic:"some topic1"},{topic:"some topic2"},{topic:"some topic3"}]}}  

my question module.section.length second section undefined first section. there way convert objects inside json arrays?


Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -