Updated method indexBy in the underscore file