title: Swift: How to build a grid in swift ui
body: <p>I want to create a grid of three colums that is sourced through a dictionary.
  so a</p>
  <pre><code>dataDict = {&quot;a&quot;:&quot;apple&quot;, &quot;b&quot;:&quot;bat&quot;, &quot;c&quot;:&quot;chango&quot;, &quot;d&quot;:&quot;december&quot;, &quot;e&quot;:&quot;elephant&quot;}
  </code></pre>
  <p>Should produce a grid displaying the value of each item?</p>
  <p>I tried to do with an array and it worked but I don't know how to keep the grid to 3 items</p>
  <pre class="lang-swift prettyprint-override"><code>struct logo : View {
  
      @State private var currentstorename: String = &quot;&quot;
      let storeLogo = [&quot;a&quot;,&quot;b&quot;,&quot;c&quot;, &quot;d&quot;, &quot;e&quot; ]
      var body: some View {
          HStack {
              ForEach(storeLogo, id: \.self) { button in
                      Text(button) 
                  }
              }
          }
      }
  }
  </code></pre>
  <p>I was able to do it the array about but how could this be done with dictionary and just keeping the colum to 3?</p>