Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8958355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:11:38+00:00 2026-06-15T15:11:38+00:00

((NSString *)result[@location][@lat]).doubleValue Or is there a shortened notation? Basically I want to cast some

  • 0
((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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T15:11:39+00:00Added an answer on June 15, 2026 at 3:11 pm

    It’s shorter to do it this way:

    [result[@"location"][@"lat"] doubleValue]
    

    because the return type of result[@"location"][@"lat"] is id, and you can send any message to an id without a complaint from the compiler. (Of course, the object has to understand the message at run time or you’ll get a fatal exception.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string of data latitude,longitude,location stored as an NSString. I want to
I have the following function: - (NSString *)urlEncodedValue { NSString *result = (NSString *)CFURLCreateStringByAddingPercentEscapes(
I read a string from a JSON result as follows: NSString *strResult = [[NSString
NSString is returning as NULL while Importing from ViewController Class were i want to
NSString *statusValue; NSString *currentValue; @property(retain, nonatomic) NSString *statusValue; @property(retain, nonatomic) NSString *currentValue; @synthesize statusValue;
I have used the following code to get the location of the particular place
I'm working on the app that uses CoreData. There is location entity that holds
I am trying to get the output of the lat and lon coordinates from
I have a long NSString I want to display over a couple of pages.
code : #import EncodeURLString.h @implementation EncodeURLString - (NSString *)urlEncodeValue:(NSString *)str { NSString *result =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.