I recently found that you’re able to save multidimensional data to Parse. Saving the data wasn’t a problem though, but getting it back from a ParseObject took me a while before I finally got it working. You have to cast it as an IList first with Get<IList<object>>, and then cycle through each IList item and casting those as an another IList. Then make a temporary List where you add the items from the 2nd IList before adding it to you final multidimensional list.
var iList = ParseObjectClass.Get<IList<object>>("dataName"); // Cast as Object IList
List<List<string>> multiList = new List<List<string>>(); // Your final output.
foreach( var item in iList ){
var itemList = item as IList<object>; // Cast item as another IList.
List<string> tempList = new List<string>(); // Temp list.
foreach( var innerItem in tempList ){
tempList.Add(innerItem.ToString()); // Add to temp list.
}
multiList.Add(tempList ); // Add to final output.
}
// Print all items.
for( int i=0; i<multiList.Count; i++ ){
for( int j=0; j<multiList[i].Count; j++ ){
Debug.Log(multiList[i][j]);
}
};
Related Posts
February 11, 2012
[Fix] Joomla: Parameter 1 to modMainMenuHelper
How to fix Joomla - Warning: Parameter 1 to modMainMenuHelper::buildXML() expected to be a reference
November 3, 2012
[How] Combine Text Files Into One File
July 20, 2011
Useful WordPress Plugins
Useful Wordpress Plugins. My list of plugins that I'm currently using for my blog and that I would recommend to other Wordpress users.
September 7, 2013
3DS Max Adventures! Volkswagen Jetta WIP
Work in progress Volkswagen Jetta car 3D model



