Panjang objek JSON di JavaScript

const data = { a : 'b', c : 'd' };

const length = Object.keys(data).length;

//Length is 2
Quaint Quoll