javascript - Checking length of dictionary object -


i'm trying check length here. tried count. there i'm missing?

var dnames = {};  dnames = getallnames();  (var = 0, l = dname.length; < l; i++)  {         alert("name: " + dname[i].name); } 

dnames holds name/value pairs. know dnames has values in object it's still skipping on , when alert out dname.length that's not how this...so not sure. looked on web. not find on this.

what use object.keys() return list of keys , length of that

object.keys(dictionary).length 

Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -