It is JavaScript not Java - they are very different languages. In JavaScript there is the concept of an associative array - this is unusual in most programming languages where these different effects are created by using different collections.
You would use a Dictionary in C# if you want to have a string (or other associative) based key. For your seconds example you would have a Dictionary that contained a Dictionary.
using System.Collections.Generic;
Dictionary<string, Dictionary<string, object>> myAssociativeDictionary = new Dictionary<string, Dictionary<string,object>>();
You would normally use a specific class instead of object in the above example to avoid having to cast often on the result.