MZ [SOLVED] javascript for detecting current map tileset id?

OK, I have a quick question about Tilesets.
can you use JavaScript to detect the Tileset id of the current map.

I have a seed based weather system in my game and I have a event on every map that tell the game whether it is indoors or outdoors, however I would like to change it to a single common event that detects Tileset ID of the current map.

Is that possible?

And if so, what is the script call to do it?
$dataMap.tilesetId
Thanks Tea, that worked.

Original thread: https://forums.rpgmakerweb.com/threads/solved-javascript-for-detecting-current-map-tileset-id.139257/