<!--
{
  "availability" : [
    "MapKit JS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKitJS",
  "identifier" : "/documentation/MapKitJS/ItemCollection/getFlattenedItemList",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "MapKit JS"
    ],
    "preciseIdentifier" : "instm/mapkit.ItemCollection/getFlattenedItemList"
  },
  "title" : "getFlattenedItemList()"
}
-->

# getFlattenedItemList()

A flattened array of items that includes annotations and overlays.

```
getFlattenedItemList(): (Annotation | Overlay)[];
```

## Discussion

The items in an [`ItemCollection`](/documentation/MapKitJS/ItemCollection) may include nested item collections. Use [`getFlattenedItemList()`](/documentation/MapKitJS/ItemCollection/getFlattenedItemList) when you need a flat array that contains individual annotations and overlays.

Access the original GeoJSON data in the [`data`](/documentation/MapKitJS/ItemCollection/data) object. To retrieve the data as MapKit JS items, use the [`items`](/documentation/MapKitJS/ItemCollection/items) or [`getFlattenedItemList()`](/documentation/MapKitJS/ItemCollection/getFlattenedItemList) objects.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)