Moving certain meshes from GLTF into groups

I actually think I’ve got it, I think I was looking at it from the wrong direction, instead of looping through everything in my mesh using the traverse method, I just looped through the items in the scene after they’ve all been added

$.each(uniquePulses, function( key, value ) {
  if (scene.getObjectByName(value) !== null) {
    let uniqueGroup = new THREE.Group({ name: value });
    let pulse = scene.getObjectByName(value);
    let childMesh = pulse.clone();
    let pulseParent = pulse.parent;

    uniqueGroup.add(childMesh);
    pulseParent.remove(pulse);

    scene.add(uniqueGroup);
  }
});

I read from this link that you’ve gotta call remove() from it’s direct parent, so I’m not 100% if this code is optimised, but it seems to be working, although it hasn’t kept the position of each item before it got removed, not a huge deal, I can probably figure it out