1const data = { a : 'b', c : 'd' };
2
3const length = Object.keys(data).length;
4
5//Length is 2
1var json=[{"id":"431","code":"0.85.PSFR01215","price":"2457.77","volume":"23.0","total":"565.29"},{"id":"430","code":"0.85.PSFR00608","price":"1752.45","volume":"4.0","total":"70.1"},{"id":"429","code":"0.84.SMAB00060","price":"4147.5","volume":"2.0","total":"82.95"},{"id":"428","code":"0.84.SMAB00050","price":"4077.5","volume":"3.0","total":"122.32"}]
2var obj = JSON.parse(json);
3var length = Object.keys(obj).length; //you get length json result 4
4