Find Index Of Object In Array Javascript Duplicates On Iphone