# Dictionary of arrays

**URL:** <https://ifnotnil.com/t/dictionary-of-arrays/467>\
**Category:** Desktop & Console\
**Created:** [14 May 2020 14:47 UTC](https://ifnotnil.com/t/dictionary-of-arrays/467 "2020-05-14T14:47:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![npalardy](https://ifnotnil.com/user_avatar/ifnotnil.com/npalardy/32/10_2.png) [@npalardy](https://ifnotnil.com/u/npalardy)\
**Post date:** [14 May 2020 14:47 UTC](https://ifnotnil.com/t/dictionary-of-arrays/467/1 "2020-05-14T14:47:33Z")

</div>

As asked on the main forums [https://forum.xojo.com/60210-dictionary-of-arrays](https://forum.xojo.com/60210-dictionary-of-arrays)

This is absolutely possible

```auto

for each f as FolderItem in folder.children
  if f.IsFolder then
    CheckForDupes(f)
  end if
  if not f.IsFolder then
    If Not g_FilenameDictionary.HasKey(name) Then
      g_FilenameDictionary.Value(name) = 1
      Dim paths() As String
      paths.append path
      g_pathsDictionary.value(name) = paths
    Else
      g_FilenameDictionary.value(name) = g_FilenameDictionary.Value(name) + 1
      Dim paths() As String = g_pathsDictionary.Value(name)
      paths.append path
      g_pathsDictionary.value(name) = paths
    End If
  end if
next

```

and to dump the data

```auto
For Each key As String In g_pathsDictionary.keys
  
  System.debuglog key
  Dim paths() As String = g_pathsDictionary.value(key)
  
  For Each path As String In paths
    System.debuglog " " + path
  Next
  
Next

```
