Get all selected in Figma document
code.js
// selection is an array of figma nodes
const { selection } = figma.currentPage;
// check to the see total selected
const selectionLength = selection.length;
// selection is an array of figma nodes
const { selection } = figma.currentPage;
// check to the see total selected
const selectionLength = selection.length;