JavaScript and Tags

I want to write a passing script which checks the count of the tags and matches them against a REGEX.
So I use the inputAttributes to input the Tags of the file.
But instead of an array/list, I get NSAppleEventDescriptor which is not working with Javascript.
Is there a way to create an array out of the EventDescriptor?
So I use the inputAttributes to input the Tags of the file.
But instead of an array/list, I get NSAppleEventDescriptor which is not working with Javascript.
Is there a way to create an array out of the EventDescriptor?