I have a array Json like this in node js.
JSON 1
var json1= {
bookmarkname: 'My Health Circles',
bookmarkurl: 'http://localhost:3000/',
bookmark_system_category: [ '22', '1' ]
}
JSON 2
var json2 = {
bookmarkname: 'My Health Circles',
bookmarkurl: 'http://localhost:3000/',
bookmark_system_category:'22'
}
I tried :
var length1=json1.bookmark_system_category.length;
var length1=json2.bookmark_system_category.length;
Expected output :
l1=2;
l2=1;