<?php
$json = '{
"models":
{
"items":
[
{
"id": 5086952,
"name": "K&K УАЗ",
"categoryId": 166068,
"prices":
{
"max": "3437",
"min": "1371",
"avg": "2124",
"curCode": "RUR",
"curName": "руб."
},
"mainPhoto":
{
"url": "http://m...content-available-to-author-only...x.net/i?ctype=1&path=b0407143125_img_id2982751556581079079.jpg",
"width": 700,
"height": 660
},
"vendor": "K&K",
"vendorId": 967139,
"offersCount": 53,
"isNew": 0,
"rating": 4,
"gradeCount": 20,
"reviewsCount": 0,
"link": "http://m...content-available-to-author-only...x.ru/model.xml?CMD=-RR=9,0,0,0-PF=1801946~EQ~sel~12129354-PF=2142397915~EQ~sel~1728823252-VIS=8070-CAT_ID=922145-EXC=1-PG=2&modelid=5086952&hid=166068",
"isGroup": true,
"modificationsCount": 1
},
{
"id": 5087157,
"name": "Replica B58",
"categoryId": 166068,
"prices":
{
"max": "10208",
"min": "2850",
"avg": "4774",
"curCode": "RUR",
"curName": "руб."
},
"mainPhoto":
{
"url": "http://m...content-available-to-author-only...x.net/i?path=b0903150122_img_id5220150240620638559.jpg",
"width": 475,
"height": 445
},
"vendor": "Replica",
"vendorId": 967138,
"offersCount": 1076,
"isNew": 0,
"rating": 5,
"gradeCount": 30,
"reviewsCount": 0,
"link": "http://m...content-available-to-author-only...x.ru/model.xml?CMD=-RR=9,0,0,0-PF=1801946~EQ~sel~12129351-PF=2142397915~EQ~sel~1899859412-VIS=8070-CAT_ID=922145-EXC=1-PG=2&modelid=5087157&hid=166068",
"isGroup": true,
"modificationsCount": 27
}
],
"page": 1,
"total": 13177,
"count": 2
}
}';
#Array предметов в категории:
#Например стоимость.
foreach ($my_obj->models->items as $item){
echo "{$item->prices->avg} {$item->prices->curName}\n";
}
?>
PD9waHAKJGpzb24gPSAnewogICJtb2RlbHMiOgogIHsKICAgICJpdGVtcyI6CiAgICBbCiAgICAgIHsKICAgICAgICAiaWQiOiA1MDg2OTUyLAogICAgICAgICJuYW1lIjogIksmSyDQo9CQ0JciLAogICAgICAgICJjYXRlZ29yeUlkIjogMTY2MDY4LAogICAgICAgICJwcmljZXMiOgogICAgICAgIHsKICAgICAgICAgICJtYXgiOiAiMzQzNyIsCiAgICAgICAgICAibWluIjogIjEzNzEiLCAKICAgICAgICAgICJhdmciOiAiMjEyNCIsCiAgICAgICAgICAiY3VyQ29kZSI6ICJSVVIiLAogICAgICAgICAgImN1ck5hbWUiOiAi0YDRg9CxLiIKICAgICAgICB9LAogICAgICAgICJtYWluUGhvdG8iOgogICAgICAgIHsKICAgICAgICAgICJ1cmwiOiAiaHR0cDovL20uLi5jb250ZW50LWF2YWlsYWJsZS10by1hdXRob3Itb25seS4uLngubmV0L2k/Y3R5cGU9MSZwYXRoPWIwNDA3MTQzMTI1X2ltZ19pZDI5ODI3NTE1NTY1ODEwNzkwNzkuanBnIiwKICAgICAgICAgICJ3aWR0aCI6IDcwMCwKICAgICAgICAgICJoZWlnaHQiOiA2NjAKICAgICAgICB9LAogICAgICAgICJ2ZW5kb3IiOiAiSyZLIiwKICAgICAgICAidmVuZG9ySWQiOiA5NjcxMzksCiAgICAgICAgIm9mZmVyc0NvdW50IjogNTMsCiAgICAgICAgImlzTmV3IjogMCwKICAgICAgICAicmF0aW5nIjogNCwKICAgICAgICAiZ3JhZGVDb3VudCI6IDIwLAogICAgICAgICJyZXZpZXdzQ291bnQiOiAwLAogICAgICAgICJsaW5rIjogImh0dHA6Ly9tLi4uY29udGVudC1hdmFpbGFibGUtdG8tYXV0aG9yLW9ubHkuLi54LnJ1L21vZGVsLnhtbD9DTUQ9LVJSPTksMCwwLDAtUEY9MTgwMTk0Nn5FUX5zZWx+MTIxMjkzNTQtUEY9MjE0MjM5NzkxNX5FUX5zZWx+MTcyODgyMzI1Mi1WSVM9ODA3MC1DQVRfSUQ9OTIyMTQ1LUVYQz0xLVBHPTImbW9kZWxpZD01MDg2OTUyJmhpZD0xNjYwNjgiLAogICAgICAgICJpc0dyb3VwIjogdHJ1ZSwKICAgICAgICAibW9kaWZpY2F0aW9uc0NvdW50IjogMQogICAgICB9LAogICAgICB7CiAgICAgICAgImlkIjogNTA4NzE1NywKICAgICAgICAibmFtZSI6ICJSZXBsaWNhIEI1OCIsCiAgICAgICAgImNhdGVnb3J5SWQiOiAxNjYwNjgsCiAgICAgICAgInByaWNlcyI6CiAgICAgICAgewogICAgICAgICAgIm1heCI6ICIxMDIwOCIsCiAgICAgICAgICAibWluIjogIjI4NTAiLAogICAgICAgICAgImF2ZyI6ICI0Nzc0IiwKICAgICAgICAgICJjdXJDb2RlIjogIlJVUiIsCiAgICAgICAgICAiY3VyTmFtZSI6ICLRgNGD0LEuIgogICAgICAgIH0sCiAgICAgICAgIm1haW5QaG90byI6CiAgICAgICAgewogICAgICAgICAgInVybCI6ICJodHRwOi8vbS4uLmNvbnRlbnQtYXZhaWxhYmxlLXRvLWF1dGhvci1vbmx5Li4ueC5uZXQvaT9wYXRoPWIwOTAzMTUwMTIyX2ltZ19pZDUyMjAxNTAyNDA2MjA2Mzg1NTkuanBnIiwKICAgICAgICAgICJ3aWR0aCI6IDQ3NSwKICAgICAgICAgICJoZWlnaHQiOiA0NDUKICAgICAgICB9LAogICAgICAgICJ2ZW5kb3IiOiAiUmVwbGljYSIsCiAgICAgICAgInZlbmRvcklkIjogOTY3MTM4LAogICAgICAgICJvZmZlcnNDb3VudCI6IDEwNzYsCiAgICAgICAgImlzTmV3IjogMCwKICAgICAgICAicmF0aW5nIjogNSwKICAgICAgICAiZ3JhZGVDb3VudCI6IDMwLAogICAgICAgICJyZXZpZXdzQ291bnQiOiAwLAogICAgICAgICJsaW5rIjogImh0dHA6Ly9tLi4uY29udGVudC1hdmFpbGFibGUtdG8tYXV0aG9yLW9ubHkuLi54LnJ1L21vZGVsLnhtbD9DTUQ9LVJSPTksMCwwLDAtUEY9MTgwMTk0Nn5FUX5zZWx+MTIxMjkzNTEtUEY9MjE0MjM5NzkxNX5FUX5zZWx+MTg5OTg1OTQxMi1WSVM9ODA3MC1DQVRfSUQ9OTIyMTQ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