GET Items possess in array ???

hi
There would be a class, method or function to quickly get the list of items possess. ?
I would like to avoid using Object.keys($gameParty._items);

In fact I would like to know the most [effective&&performance] way to get the list of items possess in an array ???
thanks
$gameParty.items()
$gameParty.items()
i forget to say i need get the ID very fast

edit: OK lol thanksss
$gameParty.items()
this.SETitemList = function() {
var list = [];
for (var id in $gameParty._items) {
list.push($dataItems[1].id);
}

}

i add .id to the function.
thats was i want.
is the most short way performance i think
$gameParty.items()
OMG
In fact I was wrong
I thought that (for in) is not better than (object key)?
https://jsperf.com/object-keys-vs-for-in-with-closure/3
seem to be 44% slower ?

i need to get the $dataItems[ID].id
the player possess in array, very fast , what are the most performance way ?
because i need to make a filter.
And filter can only do in array
Just go with object.keys with a forEach() or your filter().
These are just micro-optimizations. Unless you're performing the calculation thousands a time per frame you have nothing to worry about. I notice you seem to really care about the highest performant methods but again unless you have a noticeable slowdown and you have optimized your code already and still need speed, then you can worry about these micro-optimizations but it's really pointless to try and find the best performance of native JS functions.

Original thread: https://forums.rpgmakerweb.com/threads/get-items-possess-in-array.75763/