How to use a list 2 times i javascript
With the script below, I find a number of keywords with AdWordsApp.keywords() based on some parameters. Once these words are found, they must be paused.
My question is the following: How can I use the same list of ExactKeywords, that I have already found, to activate the same keyword in another campaign with a different name than CampaignName?
var Exact_CampaignName = "CampaignName_1"; function main() { // Getting list of keywords with cliks var kw_Conv_Exact = AdWordsApp.keywords() .withCondition("Click >= 50") .withCondition("Status = ENABLED") .withCondition(Exact_CampaignName) .get(); // Get Keywords from Campaigns_1 var ExactKeywords = []; while (kw_Conv_Exact.hasNext()) { var kw_exact = kw_Conv_Exact.next(); ExactKeywords.push(kw_exact); // Pause exaxt keywords. for(var i in ExactKeywords) { ExactKeywords[i].pause(); } //But how do I enable the same keywords from var ExactKeywords = [] but in another campaign_2??? }
Thanks in advance