Perl Create Empty Array Javascript Push Object Into Array