MV Script for conditional branch for item names

So you know how you can create a conditional branch that says
If the player name is X
do this
screenshot1.PNG
<--- like this
Does anyone have any javascript that could do something similar but
If the item name is x
do this
I think you can go to page 4 of Conditional Branch and select Script. Try to input this:
Code:
$dataItems[x].name === "Bob"
X is your item ID.
data items cannot be changed unless you let the player "name"
them or change them.

so you need to use a input name to name them, and then compare
if it is the name of the conditional, (unless you have the plugin for that)

than the methode provided by JamesRyan can work.

Original thread: https://forums.rpgmakerweb.com/threads/script-for-conditional-branch-for-item-names.136289/