Swift4 How to check if object not exists in array : I should compare MenuArray array, SavedArray array.

If MenuArray does not contain SavedArray's object, should remove SavedArray's object 

so I did.

                                for i in 0..<savedArr.count {
                                let savedDic = savedArr[i]
                               let containIndex = menuArray.index(where: { (dic) -> Bool in
                                    if dic[Keys.KEY_DISPETT_SEQ] as! Int == savedDic[Keys.KEY_DISPETT_SEQ] as! Int {
                                        return true
                                    }else{
                                        return false
                                    }
                                })
                                
                                if containIndex == nil {
                                    savedArr.filter({ (dic) -> Bool in
                                        return true
                                    })
                                }
                            }

But it's not working.

How can I do? Thank you!