# Given QuantLib Python VanillaSwap object, how to get the iborIndex of the swap object?

I'm currently using QuantLib Python. Let's say that I've got a VanillaSwap object:

import QuantLib as ql
swap_obj = ql.VanillaSwap(... , iborIndex , ...)


How can I find out what is the underlying iborIndex of the swap object?

I've tried the following already, but none of the following works:

swap_obj.index
swap_obj.iborIndex
swap_obj.index()
swap_obj.iborIndex()


first_coupon = as_floating_rate_coupon(swap_obj.floatingLeg()[0])

(Using, e.g., just first_coupon.index() would give you an instance of FloatingRateIndex, so it wouldn't have the complete interface of IborIndex.)