How To Get Subarray From Array In Javascript