How to execute a specific item in minecraft

Solution 1:

you cannot do it using execute only you must use scoreboard as in the following:

/scoreboard players set @e[type=item] Lightning 1 {Item:{id:"minecraft:tripwire_hook",Damage:0s,Count:1b,tag:{display:{Name:"Lightninger",Lore:[]}}}}

then

/execute @e[score_Lightning_min=1] ~ ~ ~ summon Lightning_Bolt

Solution 2:

Minecraft 1.13 merged NBT tags into the selector syntax, making this easy:

/execute as @e[type=item,nbt={Item:{id:"minecraft:tripwire_hook",Count:1b,tag:{display:{Name:"\"Lightninger\"",Lore:[]}}}] run summon lightning_bolt