As I see in your screenshot, the "listePersonnel" is a property of type array that contains "ItemWithQuantity" objects. When you are calling DocumentSnapshot's get(String field) method, the object that is returned is actually a HashMap and not a List, as you probably expected.
To map that array into a List, please check the following article:
Basically, you should create a new class that will hold a property called "listePersonnel" of type List and map each document into an object of that type:
val listePersonnel: List<ItemWithQuantity> = document.toObject(NewClass.class).listePersonnel
Edit:
I don't know if I can retrieve my field listePersonnel from my document as a DocumentSnapshot.
There is no way you can retrieve the "listePersonnel" and convert it to a DocumentSnapshot object. What you should do is convert the entire document into an object of the "NewClass", and then get the list, like any other property of the class.
In the article, the author uses .toObject() to convert its list to an object and you can only use it with a DocumentSnapshot.
The author (me), I'm using ".toObject()" to convert that entire document into an object that contains the desired list.
I get my document with different fields, and I want to convert a field which is a list of mappables to a list of objects.
In your database, that field is an array of objects. So you need to convert that array into a list of custom objects (as explained in this answer and that article).
I use document.get("list"), I get a Any/HashMap.
That's what we are talking about, not to use get("list") as it returns a Map, that should be iterated, as you already did, but to get that fields directly to a list of "NewClass" objects.