Display Multidimensional Array
Posted: Tue Oct 01, 2013 2:27 pm
Hello all, I need some help with the display of the Keys and Subkeys of a nestet mutidimenional global array. On the OS X platform PLIST files become more and more important !
I would like to handle PLIST files correctly (not pharsing them) in many projects.
I just recently learned that there is a commandline utility (plutil) which converts PLIST files to JSON file format, Igor de Oliveira Couto has written a wonderfull library called EasyJSON wich converts JSON to an array and back.
If one now combines the two, we can convert a PLIST file with a shell call to a JSON file and then import it into the stack, the Library from Igor then converts the JSON to a multidimensional array. This all works beautifully, check the attached stack
.
What I can not do - (and believe me I tried very hard for much to long
) is to display all the Keys and Subkeys as seen in the example of the stack !
I would like to be able to have them listet in this way:
gPlistArray["catalogs"]["5"]
gPlistArray["included manifests"]["1"]
gPlistArray["included manifests"]["2"]
etc.
so that I can copy and past them directly and work with them, also if I import complex PLISTS, I see all the Keys/Subkeys which are present.
Can anyone help
?
Cheers
Rolf
I would like to handle PLIST files correctly (not pharsing them) in many projects.
I just recently learned that there is a commandline utility (plutil) which converts PLIST files to JSON file format, Igor de Oliveira Couto has written a wonderfull library called EasyJSON wich converts JSON to an array and back.
If one now combines the two, we can convert a PLIST file with a shell call to a JSON file and then import it into the stack, the Library from Igor then converts the JSON to a multidimensional array. This all works beautifully, check the attached stack

What I can not do - (and believe me I tried very hard for much to long

I would like to be able to have them listet in this way:
gPlistArray["catalogs"]["5"]
gPlistArray["included manifests"]["1"]
gPlistArray["included manifests"]["2"]
etc.
so that I can copy and past them directly and work with them, also if I import complex PLISTS, I see all the Keys/Subkeys which are present.
Can anyone help

Cheers
Rolf