Extract Element From Array Javascript Append Function In Java