Indexof using pm.response

Hi Team,

I am looking at getting index of the json element.

Does pm.expect(pm.response.text()).to.include(“Interest Creation”) return index? Or is there another method that returns index.

Thanks
SM

@SatejMirpagar You can do this as follows:

var index = pm.response.text().indexOf('Interest Creation');

Thanks, appreciate your help.