I am not sure why I am receiving this error, and I have been checking my logs to ensure that I am using nested arrays (i.e. [[123456, 34567]]) but I am still getting this error:
Each id must be a 2-element array. (line 22)
Log:
adgroups finished loading into adgroupIDs array
accessing all keywords and putting in bids js object as bids [ keyword ] = [cpc, adgroupname]
[[27xxxx3, 510xxx75], [2718xxx4493, 4369xx753], [2718xxxx4613, 9863xxx44], [27xxxx733, 169xx619], [27xxxx14853, 43xx042], ... [27xxxx293, 751xxxxx39]]
Each id must be a 2-element array. (line 22)
I added Xs to protect privacy.
Anybody know why I am still receiving these errors?
var kwIterator = AdWordsApp.keywords().withCondition("LabelNames CONTAINS_ALL ['Some LABEL']").get();
while (kwIterator.hasNext()){
var kw = kwIterator.next();
var kwag=kw.getAdGroup().getId();
kwIDs.push([ + kwag + ', ' + kw.getId()]);
};
var keywords = AdWordsApp.keywords().withIds(kwIDs).get();
while (keywords.hasNext()) {
var keyword = keywords.next();
// Store their bidding info in a JS object.
bids[keyword.getText()] = [keyword.bidding().getCpc(), keyword.getId()];
}
Thanks as always,
J