convertNestedArraysToDic