I've got the following code:
function valor_actual(moneda) {
var url="https://poloniex.com/public?command=returnTicker";
var response = UrlFetchApp.fetch(url);
var dataAll = JSON.parse(response.getContentText());
var dataSet = dataAll;
var pair= "BTC_"+moneda
return dataSet.pair.last;
}
This code of couse is not working..
The moneda variable could have different values, for example, "VTC" or "AUR" or .... What i need is if moneda="AUR" return dataSet.BTC_AUR.last property and if moneda="SC" return dataSet.BTC_SC.last property, etc...
Regards,