Deeper data modify

Hello. I am trying to optimize my datapack for custom block stuff in my datapack to use less commands but I cannot figure out how to correctly use the data modify command. Until now I've mostly used data merge but that hardcodes the data.

I am trying to copy the item_model and item_name components of an item on the head of an armorstand onto the head of an armorstand that is the item shown by an item_display entity, as well as copy the item_model from the armorstand's head onto the armorstand item of the item_display directly.

I've tried data modify entity @e[type=item_display,tag=chair,limit=1,sort=nearest] item.components.entity_data.equipment.head merge from entity @e[type=minecraft:armor_stand,tag=chair,limit=1,sort=nearest] equipment.head

But that mushes the data into the display wrong.

Currently my pack uses one command per custom chair block for its display entity creation each, but with 12 wood types that's a lot. I already figured out how to make the breaking of them use only 2 commands, but that was easy (summon placeholder item, modify all the data of the display item to the placeholder)

Continue to help post