Array Within Array Javascript Length Function In Sql