How are enemy stats id'd in the code?

I tried various combinations of $gameTroop.somethingsomething()[0] but i cant seem to make it work
You can start with a reference to a specific enemy, e.g. the 1st enemy in the current troop:
JavaScript:
$gameTroop.members()[0]
From there, params can be checked as usual, e.g. to get that enemy's current ATK value:
JavaScript:
$gameTroop.members()[0].atk

You haven't really described what you're trying to do, so if this doesn't answer your question then consider giving a specific example with context. 👋
im not entirely sure what you mean or what you're trying to do, but if you're just trying to access them via script or something you can use $gameTroop.members()[x].Subtract 1 from the enemy's index as stated in the editor to know what to put in the script. Then use .atk, .def, or whatever you need from there

edit: master ninja Cae strikes again!
Thanks a lot everyone! Thats excatly what I needed. Greatly appriciated.

Original thread: https://forums.rpgmakerweb.com/threads/how-are-enemy-stats-idd-in-the-code.178912/