bug-fix: wrong jscript test for assoc array empty

- use length of array key to test for empty associative array