Javascript Flatten Array Into Arraylist Contains All Of The Home