Select node in plugin

How can I add a node to figma.currentPage.selection via plugin?

Basically I hide all items, and added a particular node as visible. I want this items to figma.currentPage.selection from plugin. Any option?

Check out an example on Figma Developers:

2 Likes