# Use \`apply\` as a "map()" equivalent

**URL:** <https://discourse.gohugo.io/t/use-apply-as-a-map-equivalent/39850>\
**Category:** support\
**Created:** [August 5, 2022, 6:35pm UTC](https://discourse.gohugo.io/t/use-apply-as-a-map-equivalent/39850 "2022-08-05T18:35:53Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [February 8, 2026, 4:32pm UTC](https://discourse.gohugo.io/t/use-apply-as-a-map-equivalent/39850/7 "2026-02-08T16:32:26Z")

</div>

This is a map. Think about it.

```json
{
   "a": [
      {
         "age": 30,
         "name": "Alice"
      },
      {
         "age": 25,
         "name": "Bob"
      },
      {
         "age": 35,
         "name": "Charlie"
      }
   ],
   "b": {
      "bar": [
         true,
         "x",
         21
      ],
      "foo": [
         6,
         7,
         42
      ]
   },
   "c": true,
   "d": {
      "Date": "2023-01-01T00:00:00Z",
      "Aliases": [],
      "BundleType": "",
      "Draft": false,
      "Keywords": null,
      "Sitemap": {
         "ChangeFreq": "",
         "Priority": -1,
         "Filename": "sitemap.xml",
         "Disable": false
      },
      "Weight": 0
   }
}

```

---

_[View the full topic](https://discourse.gohugo.io/t/use-apply-as-a-map-equivalent/39850)._
