What am I doing wrong here? I am trying to get unique values in my array of objects. First time it gives -1
and 2nd time also it gives -1
and so it is pushing duplicate objects into the array:
output.inventory.indexOf({"KUNNR": resultSet[row].KUNNR,"LOCATION": resultSet[row].LOCATION,"MATERIAL": resultSet[row].MATERIAL})