import fs from "fs"; const file = fs.readFileSync("TFDi_MD11_PAX_CABIN_LOD0.gltf", { encoding: "utf-8", }); const model = JSON.parse(file); model.animations.forEach((anim) => { if (anim.name.includes("MD11_CAB_ECON_TRAY")) { let done = false; anim.channels.forEach((channel) => { const id = Number.parseInt(channel.target.node); const node = model.nodes[id]; if (!done && node.name.includes("Clip")) { done = true; console.log( ` ${node.name} ${anim.name} ` ); } }); } });