Answer the question
In order to leave comments, you need to log in
How to check if a value exists in a JSON file using Vue.js?
Good afternoon. I just started learning Vue.js, the task is to get data from a JSON file (which I generate myself) and check for the presence of a variable value before displaying it in the body of the document.
{
"appid": "280",
"name": "Half-Life: Source",
"developer": "Valve",
"publisher": "Valve",
"localization": "sts",
"localization_released": "2017\/09\/04",
"game_released": "1 чер 2004",
"loc_desc": "Локалізація від STS UA у вигляді модифікаці.",
"short_desc": "Легендарний екшн про доктора Ґордона Фрімена, чий один день на роботі у корпорації «Блек-Меса» змінив увесь світ.",
"short_desc_steam": "",
"os_windows": "1",
"os_linux": "1",
"os_mac": "1",
"is_f2p": "1",
"img1_url": "https:\/\/i.imgur.com\/HS7rqcw.jpg",
"img1_ur2": "https:\/\/i.imgur.com\/CdNI6EC.jpg",
"img1_ur3": "https:\/\/i.imgur.com\/xW4FrDs.jpg",
"price_uah": "169",
"download_url": "http:\/\/steamcommunity.com\/sharedfiles\/filedetails\/?id=1127260686",
"translate_url": ""
}
<small class="translate_url">Crowdin URL: {{ info.translate_url }}</small>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question