MV Get class name by it's id or index

$dataClasses is supposed to be an array but I just get an "Object object" thing
$dataClasses().name didn't work either
according to this script calls link its $gameActors.actor(actorID).currentClass().name
really not good with script myself but neither of your attempts look like they have anything telling them which class ID you want the name of.
to get some context info:

the structures starting with $data are the database itself, read-only and used to initialise on new game etc.

the structures starting with $game are the actually used current variables. event commands like change class work on the game strutctures only.
I don't need to get the actor's class name. I need to get the class name by its id or index in the $dataClasses array.
to get some context info:
Okay, what's the script call though 😀
To get the name of class ID 123:
JavaScript:
$dataClasses[123].name
Of course! Thank u 😀

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/get-class-name-by-its-id-or-index.140154/