Q: How to create map of MAP from one list in salesforce How to create a map of MAP from list in Salesforce. 
List<sObjct> =[ID,aID,String[NJ,NY],String,String];
i have this list above, Need to created below Map of map.
Map<aID,Map<String[NJ,NY],List<sObjct>>>;
Please let me know if any ideas

A: It looks like you want something like this:
Map<Id, Map<String, SObject[]>> mapByIdByState =
  new Map<Id, Map<String, SObject[]>>();
Map<String, SObject[]> tempMap;
SObject[] tempList;
for(SObject record: listOfRecords) {
  if((tempMap = mapByIdByState.get(record.aId)) == null) {
    tempMap.put(record.aId, tempMap = new Map<String, SObject[]>());
  }
  if((tempList = tempMap.get(record.otherField)) == null) {
    tempMap.put(record.OtherField, tempList = new SObject[0]);
  }
  tempList.add(record);
}

In the end, you'll have a map grouped by parent Id then by State.
