keys = Object.keys(window.$gameParty._items)
keys[ Math.floor( Math.random() * keys.length ) ]

これでどうだ!