Certainly! If you want to simplify access to the data, you can "flatten" the array or extract the relevant part into a new variable. Since it looks like the data you want is always at $propertyData['value'][0], you can assign that to a new variable:
$data = $propertyData['value'][0];
Now you can access the ListingId like this:
$listingId = $data['ListingId'];
If you want to make this more robust (in case the structure changes or the array is empty), you can add some checks:
if (isset($propertyData['value'][0])) {
$data = $propertyData['value'][0];
// Now you can safely use $data['ListingId']
} else {
// Handle the case where the data isn't available
$data = [];
}
Summary:
Extract the nested array to a new variable for easier access. This is a common and best practice approach when dealing with deeply nested or unnecessarily complex data structures.