Answer the question
In order to leave comments, you need to log in
How to process json in vue?
Hello. I’m interested in such a question, I don’t even know how to describe the problem, I have a file that returns me joxi.ru/v29vYV7iZ9zJaA
Previously, this file used angularJs and it processed it and worked fine with it, now I’m rewriting the functionality on vuejs using axios and this file vue does not work, rewriting the file so that it returns the data in the right form is not a problem.
If you check the answer through typeof, it shows string
UPD
A piece of file
"deliverySystems": {
<?$k=1;?>
<?while ($ar_dtype = $db_dtype->Fetch())
{
//бесплатная доставка Укрпочты (временно)
if($arResult['allSum']>1500){
if($ar_dtype['ID'] == 16){
continue;
}
} elseif($arResult['allSum'] < 1500) {
if($ar_dtype['ID'] == 16){
if($aks_count_all > 1){
continue;
}
}
if($ar_dtype['ID'] == 17){
if($aks_count_all < 2){
continue;
}
}
}
if ($k!=1){echo ',';}
?>
"<?=$ar_dtype['ID']?>":{
"name":"<?if($ar_dtype["NAME"] != 'Justin') { echo $ar_dtype["NAME"]; } else { echo 'Отделение «Justin» (Фора, Сільпо)'; }?>",
"price":"<?=$ar_dtype["PRICE"]?>"
}
<?$k++;
}?>
}
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