var result = { "key1": 1, "key2": 2, "key3": 3, "key6": 5, "key4": 4, "key5": 5 }; var arrs = Object.keys(result); console.log(arrs); // Kết quả: [ "key1", "key2", "key3", "key6", "key4", "key5" ]
Last updated 2 years ago