How to get all the attributes for a particular document and its datatype?

Hello @Mamatha_M

you may also can check out the schema in VSCode with the MongoDB plugin. In case this is your favorite editor.

In all other cases compass, as recommended by @MaBeuLux88_xxx, will offer you many more features. Personally I use both since, while coding, it is faster to use the features of the editor. The VSCode plugin also brings a sandbox which is great to develop queries.

Cheers
Michael