My object data is as follows:
var object = '({10:{id:"10", v_title:"1", ' +
'13:{id:"13", v_title:"1.1", ' +
'15:{id:"15", v_title:"1.1.1 ", v_noofpara:"g2 ", v_description:"d1.1.1"}' +
'}'+
'},'+
'11:{id:"11", v_title:"2", ' +
'14:{id:"14", v_title:"2.1", ' +
'16:{id:"16", v_title:"2.1.1 ", v_noofpara:"g1 ", v_description:"des2.1.1 "}' +
'}' +
'}' +
'})'
Note that the key value 10(Grand Parent) has 13(parent) and 13 has 15(child). Similarly 11(parent) has 14 and 14 has 16.
Using hasOwnProperty
or any other methods can any one give me the count with relationship so that use it further.