Fix objectIndex returning object key instead object index