I struggle to show only first instance of an array inside the array (Multidimensional?)
I iterate full array but I only need (in second layer array - “bids”) the first instance of it… I cannot wrap my head around it…
Ex:
"items": [
{"key" : "value"
....
"bids": [
{
"id": 23329757,
"bidder": 1,
"color": "#2CC9C9",
"amount": 600,
"your_bid": false,
"reserve_met": false,
"auto": false,
"timestamp": 1696418416
},
{
"id": 23329738,
"bidder": 2,
"color": "#C9C92C",
"amount": 550,
"your_bid": false,
"reserve_met": false,
"auto": false,
"timestamp": 1696418345
}
]
},
I tried:
return ${value->get('bids')[0].amount}
This returns “object Object”…
If I use:
$value->get('bids') --key iterable
then
$iterable->get('amount')
I get the amounts but all instances of them obviously…
Everything else I figured out but this is killing me
Sorry for my bad English, I hope you understand the issue…