Inspecting elements of Cocoa object in ASOC

Hello all.

Rather than ask to see what the elements of a particular object is, which would help me only, I was wondering if there was a way of showing the elements of any object, which would possibly help others as well

My context is:

I’m getting available WiFi networks as an object, but don’t know what to do with it

related to:

Cocoa objects don’t have elements…

Hey Shane

I think this post was a little in desperation

However, I remembered something from a post a while ago

set networkNames to networks's valueForKey_("ssid")'s allObjects() as list

You do need to know the keys within the object, but these are normally available from Apple, for example:

the “keys” are actually the properties of the object.
valueForKey isn’t a good example, because in this particular meaning it’s only available for an array of dictionaries or key-value compliant objects.

For Cocoa programming it’s mandatory to read the documentation to get use to the properties and methods of the classes