Select & delete array

I want to run a query in the Employee bucket, to delete an array object, where EmployeeBranch.EmployeeBranchId is same value. How can I achieve this? I’m new to couchbase. Thanks!

JSON is like this:

{
  "EmployeeBranch": [    
    {     
        "Branch": "California",      
        "EmployeeBranchId": 1    
    },
    {      
        "Branch": "Oregon",      
        "EmployeeBranchId": 1    
    },
    {      
        "Branch": "New York",      
        "EmployeeBranchId": 2    
    }
  ],  
  "EmployeeInformation": [    
    {      
        "Branch": "California",      
        "Status": "active",      
        "EmployeeBranchId": 1    
    },    
    {      
        "Branch": "Oregon",      
        "Status": "inactive",      
        "EmployeeBranchId": 1   
    },    
    {      
        "Branch": "New York",      
        "Status": "active",        
        "EmployeeBranchId": 2    
    }
],  
    "EmployeeId": 1212
}

Desired result:

{  
  "EmployeeBranch": 
    [    
    {      
        "Branch": "California",      
        "EmployeeBranchId": 1    
    },
    {      
        "Branch": "New York",      
        "EmployeeBranchId": 2    
    }
  ],  
  "EmployeeInformation": 
  [    
    {      
        "Branch": "California",     
        "Status": "active",      
        "EmployeeBranchId": 1    
    },    
    {      
        "Branch": "Oregon",      
        "Status": "inactive",      
        "EmployeeBranchId": 1   
    },    
    {      
        "Branch": "New York",      
        "Status": "active",      
        "EmployeeBranchId": 2    
    }
  ],  
  "EmployeeId": 1212
}