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 6130687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:53:15+00:00 2026-05-23T16:53:15+00:00

When i pass an NSString as object for a key in an NSMutableDictionary it

  • 0

When i pass an NSString as object for a key in an NSMutableDictionary it seems to contain escape characters as regular characters. How can I remove them? I have tried stringByReplacingOccurrencesOfString:@”\” withString:@”” byt it does not work.

Here is my code and output:

Code:

NSString* fql1 = [NSString stringWithFormat:@"SELECT page_id FROM place WHERE distance(latitude,longitude,\"%@\",\"%@\") < 1500 AND checkin_count > 5", latitude, longitude];
    NSString* fql2 = [NSString stringWithFormat:@"SELECT author_uid, post_id, timestamp, tagged_uids, message FROM checkin WHERE page_id IN (select page_id from #PlaceQuery)"];
    NSString* fql = [[NSString stringWithFormat:@"{\"PlaceQuery\":\"%@\",\"CheckInQuery\":\"%@\"}",fql1,fql2] stringByReplacingOccurrencesOfString:@"\\" withString:@""];


NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObject:fql forKey:@"queries"];

NSLog(@"%@", fql);
NSLog(@"%@", params);

Output from NSLog(@”%@”, fql):

{“PlaceQuery”:”SELECT page_id FROM place WHERE distance(latitude,longitude,”37.331693″,”-122.030457″) < 1500 AND checkin_count > 5″,”CheckInQuery”:”SELECT author_uid, post_id, timestamp, tagged_uids, message FROM checkin WHERE page_id IN (select page_id from #PlaceQuery)”}

Output from NSLog(@”%@”, params):

{
queries = “{\”PlaceQuery\”:\”SELECT page_id FROM place WHERE distance(latitude,longitude,\”37.331693\”,\”-122.030457\”) < 1500 AND checkin_count > 5\”,\”CheckInQuery\”:\”SELECT author_uid, post_id, timestamp, tagged_uids, message FROM checkin WHERE page_id IN (select page_id from #PlaceQuery)\”}”;
}

I have been searching for hours for a solution so thanks A LOT in advance 😉

  • 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-05-23T16:53:16+00:00Added an answer on May 23, 2026 at 4:53 pm

    This turned out to be an issue about permissions… yes, embarrasing…
    What confused me was that the escape characters was in the response output…

    Thanks @williham and @nielsbot

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

Sidebar

Related Questions

How to pass a NSString object to stringByAppendingFormat in objective c. I am able
In Objective-C I can do the following and pass a UIImage (image) object into
I have an application where when I pass an object into the method sometimes
i have function with return type as (NSArray/NSData/NSString/NSDictionary and so on). i can return
I have made a custom object called students that has two nsstring object. One
How do I pass HTML code contained in a NSString directly into WebKit. I'm
I want to pass a variable to a UIButton action, for example NSString *string=@one;
In C can I pass a multidimensional array to a function as a single
Ok so im at my wit's end here. I have tried every imaginable thing
Is it possible to pass the pointer to an object in a drag and

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.