((NSString *)result[@"location"][@"lat"]).doubleValue
Or is there a shortened notation?
Basically I want to cast some stuff to NSString and get some property. Without the bracket it doesn’t work though.
I think there should be a more “elegant” notation. If so, what is it, and can that be explained? What’s the priority, etc.
It’s shorter to do it this way:
because the return type of
result[@"location"][@"lat"]isid, and you can send any message to anidwithout a complaint from the compiler. (Of course, the object has to understand the message at run time or you’ll get a fatal exception.)