Minecraft – How to add an enchantment to another item that already has some enchantments

minecraft-commandsminecraft-java-edition

I have a pickaxe with the enchantments Fortune I and Unbreaking I. I would like to add another enchantment, Mending, onto this pickaxe, without disturbing the other enchantments.

I think that the /data modify command will help me accomplish this. How can I do this?

Best Answer

Use /enchant:

/enchant @s minecraft:mending

No where does it say in the wiki doubling up on /enchant won't work and I know it does in Bedrock, so it should still work.