Reading Complex Arrays from Session

Hi

I have an associated array that I would like to store in the session.

Ex.
$cart['items'] and$cart['address'] where both items and address are arrays

Is there a way to retrieve one of those arrays directly instead of retrieving the whole $cart array using

$my_cart = $session->read('cart');

And instead do something like:

$items = $session->read('cart.items');

or

$items = $session->read("cart['items'];

Same question for $session->write()

You can use https://book.cakephp.org/3.0/en/core-libraries/hash.html