Consider the below collection. We have many data with the same pattern in the collection. All I need is to get all the distinct key name (i.e Com_stmt_execute, Table_locks_waited) excluding the actual data. I tried using .distinct() but I am not sure what to pass when there is no argument to give.
_id:5ca358c762fbaff4c7fd53c3
Com_stmt_execute:85684007
Table_locks_waited:0
Handler_rollback:1339763
Bytes_sent:57938711178278
Threads_running:6
Innodb_data_reads:559270903
Threads_connected:2561
Open_tables:6691
Host:"172.16.3.111"
Date:"2019-04-02T18:12:47"
Bytes_received:10945552148828
Handler_commit:8909267294
Name:"EmiratesMasterDB"