I have been trying to find plugins which can give me a hierarchy of elements, similar to the layer and elements structure which is shown in left panel of the app. I need to use this so that I can convert the entire Figma design to JSON at once, all the plugins that I have found so far work only for a single element and not for the whole design. Is there any way to achieve this using Figma API?
Use REST API. As an output, you can get a JSON object of the entire document or a specific page/node.