fetch("https://api.tinkoff.ru/v1/currency_rates?from=USD&to=RUB", {
"headers": {
"accept": "*/*",
"accept-language": "ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7",
"content-type": "application/x-www-form-urlencoded",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"99\", \"Google Chrome\";v=\"99\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"Windows\"",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-site"
},
"referrer": "https://www.tinkoff.ru/",
"referrerPolicy": "strict-origin-when-cross-origin",
"body": null,
"method": "GET",
"mode": "cors",
"credentials": "omit"
});
{"trackingId":"WEE285K7UR","resultCode":"OK","payload":{"lastUpdate":{"milliseconds":1646839634102},"rates":[{"category":"C2CTransfers","fromCurrency":{"code":840,"name":"USD","strCode":"840"},"toCurrency":{"code":643,"name":"RUB","strCode":"643"},"buy":111.25,"sell":138.75},{"category":"OPSRateGroup","fromCurrency":{"code":840,"name":"USD","strCode":"840"},"toCurrency":{"code":643,"name":"RUB","strCode":"643"},"buy":113.05,"sell":140.95},{"category":"DebitCardsTransfers","fromCurrency":{"code":840,"name":"USD","strCode":"840"},"toCurrency":{"code":643,"name":"RUB","strCode":"643"},"buy":113.05,"sell":140.95},{"category":"SMETransferFrom10To100G13CO","fromCurrency":{"code":840,"name":"USD","strCode":"840"},"toCurrency":{"code":643,"name":"RUB","strCode":"643"},"buy":113.05,"sell":140.95},{"category":"CUTransfersPremium","fromCurrency":{"code":840,"name":"USD","strCode":"840"},"toCurrency":{"code":643,"name":"RUB","strCode":"643"},"buy":113.05,"sell":140.95},{"category":"SMETransferBelow10G11","fromCurrency":{"code":840,"name":"USD","strCode":"840"},"toCurrency":{"code":643,"name":"RUB","strCode":"643"},"buy":113.05,"sell":140.95},{"category":"DepositPayments","fromCurrency":{"code":840,"name":"USD","strCode":"840"},"toCurrency":{"code":643,"name":"RUB","strCode":"643"},"buy":111.25,"sell":138.75},{"category":"SMETransferAbove100","fromCurrency":{"code":840,"name":"USD","strCode":"840"},"toCurrency":{"code":643,"name":"RUB","strCode":"643"},"buy":113.05,"sell":140.95},{"category":"SMETransferBelow10","fromCurrency":{"code":840,"name":"USD","strCode":"840"},"toCurrency":{"code":643,"name":"RUB","strCode":"643"},"buy":113.05,"sell":140.95},{"category":"CreditCardsOperations","fromCurrency":{"code":840,"name":"USD","strCode":"840"},"toCurrency":{"code":643,"name":"RUB","strCode":"643"},"buy":111.25,"sell":138.75},{"category":"CUTransferAbove100","fromCurrency":{"code":840,"name":"USD","strCode":"840"},"toCurrency":{"code":643,"name":"RUB","strCode":"643"},"buy":113.05,"sell":140.95},{"category":"PrepaidCardsOperations","fromCurrency":{"code":840,"name":"USD","strCode":"840"},"toCurrency":{"code":643,"name":"RUB","strCode":"643"},"buy":111.25,"sell":138.75},{"category":"SMETransferAbove100G13","fromCurrency":{"code":840,"name":"USD","strCode":"840"},"toCurrency":{"code":643,"name":"RUB","strCode":"643"},"buy":113.05,"sell":140.95},{"category":"SMETransferFrom10To100G13","fromCurrency":{"code":840,"name":"USD","strCode":"840"},"toCurrency":{"code":643,"name":"RUB","strCode":"643"},"buy":113.05,"sell":140.95},{"category":"SMETransferBelow10G12","fromCurrency":{"code":840,"name":"USD","strCode":"840"},"toCurrency":{"code":643,"name":"RUB","strCode":"643"},"buy":113.05,"sell":140.95},{"category":"SMETransferFrom10To100G11","fromCurrency":{"code":840,"name":"USD","strCode":"840"},"toCurrency":{"code":643,"name":"RUB","strCode":"643"},"buy":113.05,"sell":140.95},{"category":"SMETransferBelow10G13CO","fromCurrency":{"code":840,"name":"USD","strCode":"840"},"toCurrency":{"code":643,"name":"RUB","strCode":"643"},"buy":113.05,"sell":140.95},{"category":"CUTransferFrom10To100","fromCurrency":{"code":840,"name":"USD","strCode":"840"},"toCurrency":{"code":643,"name":"RUB","strCode":"643"},"buy":113.05,"sell":140.95},{"category":"SMETransferAbove100G12","fromCurrency":{"code":840,"name":"USD","strCode":"840"},"toCurrency":{"code":643,"name":"RUB","strCode":"643"},"buy":113.05,"sell":140.95},{"category":"SMETransferAbove100G13CO","fromCurrency":{"code":840,"name":"USD","strCode":"840"},"toCurrency":{"code":643,"name":"RUB","strCode":"643"},"buy":113.05,"sell":140.95},{"category":"SMETransferAbove100G11","fromCurrency":{"code":840,"name":"USD","strCode":"840"},"toCurrency":{"code":643,"name":"RUB","strCode":"643"},"buy":113.05,"sell":140.95},{"category":"PrepaidCardsTransfers","fromCurrency":{"code":840,"name":"USD","strCode":"840"},"toCurrency":{"code":643,"name":"RUB","strCode":"643"},"buy":113.05,"sell":140.95},{"category":"DebitCardsOperations","fromCurrency":{"code":840,"name":"USD","strCode":"840"},"toCurrency":{"code":643,"name":"RUB","strCode":"643"},"buy":111.25,"sell":138.75},{"category":"SavingAccountTransfers","fromCurrency":{"code":840,"name":"USD","strCode":"840"},"toCurrency":{"code":643,"name":"RUB","strCode":"643"},"buy":113.05,"sell":140.95},{"category":"SMETransferFrom10To100G12","fromCurrency":{"code":840,"name":"USD","strCode":"840"},"toCurrency":{"code":643,"name":"RUB","strCode":"643"},"buy":113.05,"sell":140.95},{"category":"CUTransfersPro","fromCurrency":{"code":840,"name":"USD","strCode":"840"},"toCurrency":{"code":643,"name":"RUB","strCode":"643"},"buy":113.05,"sell":140.95},{"category":"CreditCardsTransfers","fromCurrency":{"code":840,"name":"USD","strCode":"840"},"toCurrency":{"code":643,"name":"RUB","strCode":"643"},"buy":113.05,"sell":140.95},{"category":"SMETransferBelow10G13","fromCurrency":{"code":840,"name":"USD","strCode":"840"},"toCurrency":{"code":643,"name":"RUB","strCode":"643"},"buy":113.05,"sell":140.95},{"category":"SMETransferFrom10To100","fromCurrency":{"code":840,"name":"USD","strCode":"840"},"toCurrency":{"code":643,"name":"RUB","strCode":"643"},"buy":113.05,"sell":140.95}]}}
=arrayformula({
importrange(id1;range1);
importrange(id2;range2);
importrange(id3;range3);
importrange(id4;range4)
})
fetch("http://api.com/api/query?id=1").
then(ret=>ret.json()).then(ret=>{
let dataNames = ret.data.name.split(", ");
let names = ["Krusl", "Goody", "Timo"];
let outName = "";
for (i=0; i<names.length; i++){
let name = names[i];
let index = dataNames.indexOf(name);
if(-1!==index){
outName = name;
break;
};
};
$("#Name").text("Nick: "+outName);
$("#Year").text("Years old: "+ret.data.year)
})
({'CONFIG':{'USE_CATALOG':true,'SHOW_QUANTITY':false,'SHOW_PRICE':true,'SHOW_DISCOUNT_PERCENT':false,'SHOW_OLD_PRICE':false,'DISPLAY_COMPARE':false,'SHOW_SKU_PROPS':true,'OFFER_GROUP':false,'MAIN_PICTURE_MODE':'IMG','SHOW_BASIS_PRICE':true,'ADD_TO_BASKET_ACTION':['ADD'],'SHOW_CLOSE_POPUP':true,'USE_STICKERS':true},'PRODUCT_TYPE':'3','VISUAL':{'ID':'bx_117848907_312'},'DEFAULT_PICTURE':{'PREVIEW_PICTURE':{'SRC':'/local/templates/vortex/components/bitrix/catalog/main/bitrix/catalog.element/.default/images/no_photo.png','WIDTH':'150','HEIGHT':'150'},'DETAIL_PICTURE':{'SRC':'/local/templates/vortex/components/bitrix/catalog/main/bitrix/catalog.element/.default/images/no_photo.png','WIDTH':'150','HEIGHT':'150'}},'PRODUCT':{'ID':'312','NAME':'Дезинфицирующее средство Forbicid'},'BASKET':{'QUANTITY':'quantity','BASKET_URL':'/basket/','SKU_PROPS':'YToxOntpOjA7czo0OiJCVUxLIjt9','ADD_URL_TEMPLATE':'/catalog/moyushchie-i-dezinfitsiruyushchie-sredstva-dlya-agropromyshlennogo-kompleksa/ptitsevodstvo/forbicid/?action=ADD2BASKET&id=#ID#','BUY_URL_TEMPLATE':'/catalog/moyushchie-i-dezinfitsiruyushchie-sredstva-dlya-agropromyshlennogo-kompleksa/ptitsevodstvo/forbicid/?action=BUY&id=#ID#'},'OFFERS':[{'ID':'1023','NAME':'Forbicid','TREE':{'PROP_20':'4'},'PRICE':{'VALUE':'497','DISCOUNT_VALUE':'497','PRINT_VALUE':'497 руб.','PRINT_DISCOUNT_VALUE':'497 руб.','DISCOUNT_DIFF':'0','PRINT_DISCOUNT_DIFF':'0 руб.','DISCOUNT_DIFF_PERCENT':'0','CURRENCY':'RUB'},'BASIS_PRICE':{'PRICE_ID':'1','ID':'454','CAN_ACCESS':'Y','CAN_BUY':'Y','MIN_PRICE':'Y','CURRENCY':'RUB','VALUE_VAT':'497','VALUE_NOVAT':'497','DISCOUNT_VALUE_VAT':'497','DISCOUNT_VALUE_NOVAT':'497','ROUND_VALUE_VAT':'497','ROUND_VALUE_NOVAT':'497','VALUE':'497','UNROUND_DISCOUNT_VALUE':'497','DISCOUNT_VALUE':'497','DISCOUNT_DIFF':'0','DISCOUNT_DIFF_PERCENT':'0','VATRATE_VALUE':'0','DISCOUNT_VATRATE_VALUE':'0','ROUND_VATRATE_VALUE':'0','PRINT_VALUE_NOVAT':'497 руб.','PRINT_VALUE_VAT':'497 руб.','PRINT_VATRATE_VALUE':'0 руб.','PRINT_DISCOUNT_VALUE_NOVAT':'497 руб.','PRINT_DISCOUNT_VALUE_VAT':'497 руб.','PRINT_DISCOUNT_VATRATE_VALUE':'0 руб.','PRINT_VALUE':'497 руб.','PRINT_DISCOUNT_VALUE':'497 руб.','PRINT_DISCOUNT_DIFF':'0 руб.'},'DISPLAY_PROPERTIES':'<dt>Артикул<\/dt><dd>12141<\/dd>','PREVIEW_PICTURE':{'ID':'2689','SRC':'/upload/iblock/0c9/0c9dd963188c3a1fed208048a9f2101c.jpg','WIDTH':'450','HEIGHT':'369','PREVIEW':'/upload/resize_cache/iblock/0c9/330_430_1/0c9dd963188c3a1fed208048a9f2101c.jpg','SMALL':'/upload/resize_cache/iblock/0c9/90_90_2/0c9dd963188c3a1fed208048a9f2101c.jpg'},'DETAIL_PICTURE':{'ID':'2689','SRC':'/upload/iblock/0c9/0c9dd963188c3a1fed208048a9f2101c.jpg','WIDTH':'450','HEIGHT':'369','PREVIEW':'/upload/resize_cache/iblock/0c9/330_430_1/0c9dd963188c3a1fed208048a9f2101c.jpg','SMALL':'/upload/resize_cache/iblock/0c9/90_90_2/0c9dd963188c3a1fed208048a9f2101c.jpg'},'CHECK_QUANTITY':false,'MAX_QUANTITY':'0','STEP_QUANTITY':'1','QUANTITY_FLOAT':false,'MEASURE':'шт','OFFER_GROUP':false,'CAN_BUY':true,'SLIDER':[{'ID':'2689','SRC':'/upload/iblock/0c9/0c9dd963188c3a1fed208048a9f2101c.jpg','WIDTH':'450','HEIGHT':'369','PREVIEW':'/upload/resize_cache/iblock/0c9/330_430_1/0c9dd963188c3a1fed208048a9f2101c.jpg','SMALL':'/upload/resize_cache/iblock/0c9/90_90_2/0c9dd963188c3a1fed208048a9f2101c.jpg'}],'SLIDER_COUNT':'1'},{'ID':'309','NAME':'Forbicid','TREE':{'PROP_20':'6'},'PRICE':{'VALUE':'2284','DISCOUNT_VALUE':'2284','PRINT_VALUE':'2 284 руб.','PRINT_DISCOUNT_VALUE':'2 284 руб.','DISCOUNT_DIFF':'0','PRINT_DISCOUNT_DIFF':'0 руб.','DISCOUNT_DIFF_PERCENT':'0','CURRENCY':'RUB'},'BASIS_PRICE':{'PRICE_ID':'1','ID':'41','CAN_ACCESS':'Y','CAN_BUY':'Y','MIN_PRICE':'Y','CURRENCY':'RUB','VALUE_VAT':'2284','VALUE_NOVAT':'2284','DISCOUNT_VALUE_VAT':'2284','DISCOUNT_VALUE_NOVAT':'2284','ROUND_VALUE_VAT':'2284','ROUND_VALUE_NOVAT':'2284','VALUE':'2284','UNROUND_DISCOUNT_VALUE':'2284','DISCOUNT_VALUE':'2284','DISCOUNT_DIFF':'0','DISCOUNT_DIFF_PERCENT':'0','VATRATE_VALUE':'0','DISCOUNT_VATRATE_VALUE':'0','ROUND_VATRATE_VALUE':'0','PRINT_VALUE_NOVAT':'2 284 руб.','PRINT_VALUE_VAT':'2 284 руб.','PRINT_VATRATE_VALUE':'0 руб.','PRINT_DISCOUNT_VALUE_NOVAT':'2 284 руб.','PRINT_DISCOUNT_VALUE_VAT':'2 284 руб.','PRINT_DISCOUNT_VATRATE_VALUE':'0 руб.','PRINT_VALUE':'2 284 руб.','PRINT_DISCOUNT_VALUE':'2 284 руб.','PRINT_DISCOUNT_DIFF':'0 руб.'},'DISPLAY_PROPERTIES':'<dt>Артикул<\/dt><dd>12145<\/dd>','PREVIEW_PICTURE':{'ID':'1039','SRC':'/upload/iblock/3d3/3d3ec490013beb7a389b856a5d85be34.jpg','WIDTH':'450','HEIGHT':'369','PREVIEW':'/upload/resize_cache/iblock/3d3/330_430_1/3d3ec490013beb7a389b856a5d85be34.jpg','SMALL':'/upload/resize_cache/iblock/3d3/90_90_2/3d3ec490013beb7a389b856a5d85be34.jpg'},'DETAIL_PICTURE':{'ID':'1039','SRC':'/upload/iblock/3d3/3d3ec490013beb7a389b856a5d85be34.jpg','WIDTH':'450','HEIGHT':'369','PREVIEW':'/upload/resize_cache/iblock/3d3/330_430_1/3d3ec490013beb7a389b856a5d85be34.jpg','SMALL':'/upload/resize_cache/iblock/3d3/90_90_2/3d3ec490013beb7a389b856a5d85be34.jpg'},'CHECK_QUANTITY':false,'MAX_QUANTITY':'0','STEP_QUANTITY':'1','QUANTITY_FLOAT':false,'MEASURE':'шт','OFFER_GROUP':false,'CAN_BUY':true,'SLIDER':[{'ID':'1039','SRC':'/upload/iblock/3d3/3d3ec490013beb7a389b856a5d85be34.jpg','WIDTH':'450','HEIGHT':'369','PREVIEW':'/upload/resize_cache/iblock/3d3/330_430_1/3d3ec490013beb7a389b856a5d85be34.jpg','SMALL':'/upload/resize_cache/iblock/3d3/90_90_2/3d3ec490013beb7a389b856a5d85be34.jpg'}],'SLIDER_COUNT':'1'},{'ID':'310','NAME':'Forbicid','TREE':{'PROP_20':'7'},'PRICE':{'VALUE':'8954','DISCOUNT_VALUE':'8954','PRINT_VALUE':'8 954 руб.','PRINT_DISCOUNT_VALUE':'8 954 руб.','DISCOUNT_DIFF':'0','PRINT_DISCOUNT_DIFF':'0 руб.','DISCOUNT_DIFF_PERCENT':'0','CURRENCY':'RUB'},'BASIS_PRICE':{'PRICE_ID':'1','ID':'42','CAN_ACCESS':'Y','CAN_BUY':'Y','MIN_PRICE':'Y','CURRENCY':'RUB','VALUE_VAT':'8954','VALUE_NOVAT':'8954','DISCOUNT_VALUE_VAT':'8954','DISCOUNT_VALUE_NOVAT':'8954','ROUND_VALUE_VAT':'8954','ROUND_VALUE_NOVAT':'8954','VALUE':'8954','UNROUND_DISCOUNT_VALUE':'8954','DISCOUNT_VALUE':'8954','DISCOUNT_DIFF':'0','DISCOUNT_DIFF_PERCENT':'0','VATRATE_VALUE':'0','DISCOUNT_VATRATE_VALUE':'0','ROUND_VATRATE_VALUE':'0','PRINT_VALUE_NOVAT':'8 954 руб.','PRINT_VALUE_VAT':'8 954 руб.','PRINT_VATRATE_VALUE':'0 руб.','PRINT_DISCOUNT_VALUE_NOVAT':'8 954 руб.','PRINT_DISCOUNT_VALUE_VAT':'8 954 руб.','PRINT_DISCOUNT_VATRATE_VALUE':'0 руб.','PRINT_VALUE':'8 954 руб.','PRINT_DISCOUNT_VALUE':'8 954 руб.','PRINT_DISCOUNT_DIFF':'0 руб.'},'DISPLAY_PROPERTIES':'<dt>Артикул<\/dt><dd>121420<\/dd>','PREVIEW_PICTURE':{'ID':'1040','SRC':'/upload/iblock/b0d/b0d7392d63763601e9b68a348a7ec36f.jpg','WIDTH':'450','HEIGHT':'369','PREVIEW':'/upload/resize_cache/iblock/b0d/330_430_1/b0d7392d63763601e9b68a348a7ec36f.jpg','SMALL':'/upload/resize_cache/iblock/b0d/90_90_2/b0d7392d63763601e9b68a348a7ec36f.jpg'},'DETAIL_PICTURE':{'ID':'1040','SRC':'/upload/iblock/b0d/b0d7392d63763601e9b68a348a7ec36f.jpg','WIDTH':'450','HEIGHT':'369','PREVIEW':'/upload/resize_cache/iblock/b0d/330_430_1/b0d7392d63763601e9b68a348a7ec36f.jpg','SMALL':'/upload/resize_cache/iblock/b0d/90_90_2/b0d7392d63763601e9b68a348a7ec36f.jpg'},'CHECK_QUANTITY':false,'MAX_QUANTITY':'0','STEP_QUANTITY':'1','QUANTITY_FLOAT':false,'MEASURE':'шт','OFFER_GROUP':false,'CAN_BUY':true,'SLIDER':[{'ID':'1040','SRC':'/upload/iblock/b0d/b0d7392d63763601e9b68a348a7ec36f.jpg','WIDTH':'450','HEIGHT':'369','PREVIEW':'/upload/resize_cache/iblock/b0d/330_430_1/b0d7392d63763601e9b68a348a7ec36f.jpg','SMALL':'/upload/resize_cache/iblock/b0d/90_90_2/b0d7392d63763601e9b68a348a7ec36f.jpg'}],'SLIDER_COUNT':'1'}],'OFFER_SELECTED':'0','TREE_PROPS':[{'ID':'20','SHOW_MODE':'TEXT','VALUES_COUNT':'4'}]})
=$A$1+ЦЕЛОЕ(СТРОКА()/2)
=ИЛИ(A1=1,1;A1=2,1)
=+ПОДСТАВИТЬ(A1;".";",")