Complete the method definition given below.
campaign_details is an array of hashes that contains the details of a campaign. Each hash contains the following keys: "name", "state", "id" and "completed". new_locations is an array of hashes that contains the details of new locations, where each hash has the same keys as the hashes in campaign_details. completed_location_id is an array of ids of locations where the campaign has been completed.
Given campaign_details, new_locations and completed_location_id, the method should add the new_locations to existing campaign_details. For each location in the updated campaign_details, the method should set the completed key to true if the location's id is in completed_location_id. The method should finally return the updated campaign_details.