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

  • Home
  • SEARCH
  • 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 3879572
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T22:44:31+00:00 2026-05-19T22:44:31+00:00

This may be a few questions bundled into one, but here is the situation.

  • 0

This may be a few questions bundled into one, but here is the situation. I am working in objective c, and have a for loop that’s going through an array of dictionary objects… like so.

  for (NSDictionary *dictionary in array){
         log(@"the dictionary object looks like this \n%@\n",dictionary);
         log(@"value of someProp in the current dict object is %@",[dictionary valueForKey:@"someProp"]);
  }

well that’s all nice and dandy but I want to tidy up how it prints out to the console a little bit. I am new to objective c, but experienced in other languages. I want to do something like this in objective c (wrote it in actionscript for an example)

  var outputString:String;

  for (items in dictionary){
     outputString += dictionary.toString();
     outputString += "value of item in current dict object is " + dictionary [item];// etc

  }

  // now just print out the contents of outputString;
  trace(outputString);

the challenge I have here is collating the objects that are not of type string or NSString..

I know stuff like

  NSString *outputString = @"";

  for (//same loop as above in obj-c){
      outputString = [outputString stringByAppendingString:**someString**];

  }

but maybe I am just unfamiliar with the appropriate string method, because simply substituting dictionary to print out the whole dictionary object where it reads someString will produce an error because of course a dictionary object is not a string.

So I would like to

-accumulate the contents of what I would like to NSLog out in a series of strings summing it all up

-this includes the printing out the contents of dictionary objects (or maybe array objects too) converting it to a string, and adding it to outputString.

Anyone have any advice on how to go about doing this?

  • 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-19T22:44:32+00:00Added an answer on May 19, 2026 at 10:44 pm

    Try using [NSString stringWithFormat:@”Something about value: %@”, dictionaryItem]

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

Sidebar

Related Questions

Ok I have looked at a few questions on here concerning this topic. But
i have few questions for SQL gurus in here ... Briefly this is ads
I have a few questions concerning Lists, classes and variables in clojure. This may
There are a few questions around that circle around this question but I feel
I know this questions has been asked a few times here. But these seem
This may be rather noobish but I'm gonna ask anyhow. I have a class
There are a few questions about this, but none of them helped me. I
I've seen a few questions like the one I'll ask but nothing identical. I
I know there are quite a few questions concerning access violations, but I have
I have a few questions about storing files on the operating system. These may

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.