Skip to content

Instantly share code, notes, and snippets.

@sowe
Created July 23, 2013 11:08
Show Gist options
  • Save sowe/6061600 to your computer and use it in GitHub Desktop.
Save sowe/6061600 to your computer and use it in GitHub Desktop.
//Script here
var io =isUndefined (e(io),0).number;
var mp =isUndefined (e(mp),0).number;
var tmp;
eval("tmp = " + creatives);
var n =isUndefined (n,0);
if(typeof(tmp) != "null"){
Alert(tmp.length);
for (var i = 0; i < tmp.length; i++){
creativEname =tmp[i].name;
idaux=tmp[i]._id;
creativId =idaux.$oid;
//Alert(creativId);
_step_.putRow(
rowMeta,
[
io,
mp,
cname,
n,
creatives,
creativEname,
creativId,
adv_price,
pub_price,
]
);
}
}
function e (aux){
var tmp2;
eval("tmp2 = " + aux);
if(!(tmp2 instanceof Array)) {
return tmp2;
}else{
return tmp2;
}
}
function isUndefined (aux, valor){
if(typeof(aux) === undefined || aux === undefined || aux === "undefined" || aux == null || typeof(aux) === null ||typeof(aux) === "null" ){
Alert(aux);
return valor
}else{
return aux
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment