Answer the question
In order to leave comments, you need to log in
How to get an arbitrary element from JSON?
How to get an arbitrary element from a JSON file and display it on the page.
For example, how to get the value of the "allcoast" element and display it on the page.
If possible, tell me how to do this through Jquery and regular JS
[
{
"title01": "CPU",
"title": "AMD Ryzen 5 1600 BOX",
"shopcode": 1604575,
"link": "",
"cost": "8 399 Р.",
"allcoast": "23 333"
},
{
"title01": "VIDEO",
"title": "MSI AMD Radeon RX 580 ARMOR OC [RX 580 ARMOR 8G OC]",
"shopcode": 1113299,
"link": "",
"cost": "12,999 Р."
},
{
"title01": "MB",
"title": "MSI B350M PRO-VD PLUS",
"shopcode": 1151988,
"link": "",
"cost": "4,250 Р."
}
]
Answer the question
In order to leave comments, you need to log in
console.log(json[0].allcoast);
In general, go through the cycle and output.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question