eosio multi index auto index code example
Example: eosio multi index secondary index
voting::identity_index identities(_self, _self.value);
auto idx = identities.get_index<"byhash"_n>();
auto itr = idx.find(out);
eosio_assert(itr == identities.end(), "User already registered to vote!");