This could just be `titles.indexOf("Type")`, and then you don't need the `arrayIndexOf` function. All new-ish browsers except IE in compatibility mode support `Array.indexOf`, and Zotero makes it work in IE compatibility modes too.