JavaScript inArray Object extension