trendyol api ile json formatında günlük data çekmekyetim, ancak color ve size değerlerini kaldırarak attributes array'inin içine aldılar,
array içinde color ve size'ın ID değerleri mevcut ve ben sadece bu değerlerdeki bilgileri nasıl alırım, örnek kod aşağıda
[6] => stdClass Object
(
[approved] => 1
[attributes] => Array
(
[0] => stdClass Object
(
[attributeId] => 47
[attributeName] => Renk
[attributeValue] => Vizon
)
[1] => stdClass Object
(
[attributeId] => 346
[attributeName] => Yaş Grubu
[attributeValue] => Yetişkin
[attributeValueId] => 4293
)
[2] => stdClass Object
(
[attributeId] => 343
[attributeName] => Cinsiyet
[attributeValue] => Kadın / Kız
[attributeValueId] => 4295
)
[3] => stdClass Object
(
[attributeId] => 338
[attributeName] => Beden
[attributeValue] => 42
[attributeValueId] => 5864
)
)
[barcode] => MN2746SFNDR240742burada, [attributeId] => 47 nin altındaki [attributeValue] => Vizon kısmını ve [attributeId] => 338 deki [attributeValue] => 42 kısımlarını almak istiyorum,[attributeId] => 47 ve [attributeId] => 338 her zaman sabittir ancak [0], [1], [2], [3] sıralamaları değişmektedir onun alttaki kod ile alamıyorum
$renk = $json['attributes]'][0]['attributeValue'];şimdiden yardımlarınız için teşekkürler..
çok çok teşekkürler.