List of attributes in the JSON file

Is there a way we can list all the attributes that are available in the JSON file?
Like in database, there are metadata tables that would help to list the columns in a table. Similarly is there a way in MongoDB to list all the attributes consolidated from all documents (as each document can contain different columns). And also curious to know, how does it list attributes for subdocuments (with dot operator?)?

Request to clarify from command line and not using GUI. Attributes here refers to “keys” in JSON file