var str = '{"success":1,"items":{"Orb of Deliverance":{"price":36.8,"appid":"570"},"Planks of the Bogatyr":{"price":0.2,"appid":"570"},"Virulent Matriach":{"price":921.27,"appid":"570"}}}';
var obj = JSON.parse(str);
var price = obj.items['Planks of the Bogatyr'].price;
console.log(price);
<a href='' id='report-link' download style='display: none;'></a>
В JS:var data = new FormData();
data.append('file', document.getElementById('file').files[0]);
var post = new XMLHttpRequest();
post.open('POST', 'where/to/send', true);
post.onreadystatechange = function() {
if (post.readyState != 4) {
return;
}
hideSpinner();
switch (post.status) {
case 200:
var a = document.getElementById('report-link');
a.href = '/get/file/from&id=' + post.responseText;
a.click();
break;
...
}
}
showSpinner();
post.send(data);
$('.photo').click(function(){
$('.photo').removeClass('active-photo');
$(this).addClass('active-photo');
$('.about-text p').text($(this).data('text'));
$('.about-site p').text($(this).data('info'));
$('.about-site a').text($(this).data('webSite')).attr("href", "#");
$('.point li').removeClass('active-point');
$('.point li')[$(this).data('listNumber')].addClass('active-point');
});
function rand80() {
let result = ''+Math.floor(Math.random()*10000000000);
for (let i = 0; i < 7; i++) {
result += ('0000000000'+Math.floor(Math.random()*10000000000)).substr(-10);
}
return result;
}
console.log(rand80());
78687700753019149846288536942965286843811762227419373094448469993291737449820343