I need help with javascript code, i want to display the:
AK-47 | Aquamarine Revenge (Battle-Scarred)
i tried just copy pasting it like: "value.AK-47 | Aquamarine Revenge (Battle-Scarred)"
but it didnt work
- How do i put it into the " value. " ?
- i would like to display the "24_hours"-"average" but i don't know how to do it.
- If there are numbers how do i select them?
Javascript:
$.ajax({
url: 'download.json',
dataType: 'json',
type: 'get',
cache: false,
success: function(data){
$(data.items_list).each(function(index, value) {
console.log(value. )));
});
}
});
JSON File:
{
"currency": "USD",
"items_list": {
"AK-47 | Aquamarine Revenge (Battle-Scarred)": {
"classid": "1759174527",
"exterior": "Battle-Scarred",
"first_sale_date": "1432764000",
"gun_type": "AK-47",
"icon_url": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpot7HxfDhjxszJemkV09-5gZKKkPLLMrfFqWNU6dNoxL3H94qm3Ffm_RE6amn2ctWXdlI2ZwqB-FG_w-7s0ZK-7cjLzyE37HI8pSGKrIDGOAI",
"icon_url_large": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpot7HxfDhjxszJemkV09-5gZKKkPLLMrfFqWNU6dNoteXA54vwxgCyqRVvZzrxItTDewY7NwvS_gW2x7y-h5a9vp3KnXZh63Ug4yyJyUepwUYbPABm4j8",
"marketable": 1,
"name": "AK-47 | Aquamarine Revenge (Battle-Scarred)",
"price": {
"24_hours": {
"average": 18.54,
"highest_price": 28.4,
"lowest_price": 15.85,
"median": 18.22,
"sold": "13",
"standard_deviation": "19.82"
},
"30_days": {
"average": 15.32,
"highest_price": 28.4,
"lowest_price": 8.31,
"median": 15.32,
"sold": "1611",
"standard_deviation": "8.96"
},
"7_days": {
"average": 16.5,
"highest_price": 28.4,
"lowest_price": 14.13,
"median": 16.4,
"sold": "400",
"standard_deviation": "9.18"
},
"all_time": {
"average": 12.42,
"highest_price": 32.68,
"lowest_price": 6.62,
"median": 14.25,
"sold": "170751",
"standard_deviation": "27.86"
},
},
},
}
}