Get First Index Of Array Javascript Methods For Querying