How to get the json format information of all nodes

Hi,
How to automatically collect all node information and print it to the console, (define a function node to do this instead of manually clicking the export button in the upper right corner)

Asked and answered.

Please don't double post. Nick has asked you for more details in the original thread. Please continue there.