This might be stupid/overly complicated/near impossible, but...

I have a JSON file. I used a C# class (<http://bit.ly/1bl73Ji>) to parse the file into a HashTable.

So, I now have a HashTable. This HashTable has Keys and Values. But, some of these Values are ArrayLists or HashTables. Sometimes these ArrayLists contain HashTables, sometimes the HashTables contain Hashtables, and so on and so forth...

I'm basically just trying to print these keys and values into a file, just using simple indentation to differentiate, e.g.

```
dateLastActivity
    2013-07-01T13:50:51.746Z
members
    memberType
        normal
    avatarHash
        5f9a6a60b6e669e81ed3a886ae
    confirmed
        True
    status
        active
    url
        www.awebsite.com
    id
        4fcde962a1b057c46607c1
    initials
        AP
    username
        ap
    fullName
        A Person
    bio
        Software developer

```

I need to recursivley go through the Hashtable, checking if the value is an ArrayList or HashTable, and keep checking and checking until it's just a string value. I've had a crack at it but I just can't seem to wrap my head around the recursive-ness.

Can anybody help? Even if somebody can think of a better way or if I should just abandon hope, I'd like to hear it!

Thanks in advance!