Js Take N Elements From Array To Dataframe