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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:28:34+00:00 2026-06-03T21:28:34+00:00

With the following way… NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths

  • 0

With the following way…

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, 
                                                     NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString* path = [documentsDirectory stringByAppendingPathComponent: 
                  [NSString stringWithFormat:@"/lkj/"]];

NSString *fileName = [NSString stringWithFormat:@"/sandbox/2012_05_11.json"];

[[self restClient] loadFile:fileName intoPath:path];

NSString *fileContent = [[NSString alloc] initWithContentsOfFile:path];  

SBJsonParser *parser = [[SBJsonParser alloc] init];

NSDictionary *data = (NSDictionary *) [parser objectWithString:fileContent error:nil];  

// getting the data from inside of "menu"  

NSString *message = (NSString *) [data objectForKey:@"message"];
 NSString *name = (NSString *) [data objectForKey:@"name"];

namegroup.text = [NSString stringWithFormat:@"%@  %@",name, message];

…I am trying to parse a document I have previously made with other code…

{"message":["Untitled1a","Untitled2a","Untitled3a"],"name":["Untitled1b","Untitled2b","Untitled3b"]}

with the code above though, in name group.text, this appears…

(untitled, untitled, untitled) (untitled, untitled, untitled)

…but what I would like to do is to allocate many UITextFields, each of them in pairs, (2, 2, 2..), one field which displays the name and the other the message, so pair up 1a with 1b, 2a with 2b… obviously the fields won’t be Untitled1a, but “how are you”…

But I can’t seem to fix this issue!! Please help!!

  • 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-03T21:28:35+00:00Added an answer on June 3, 2026 at 9:28 pm

    You may try something like this:

     NSArray *message = [data objectForKey:@"message"];
     NSArray *name    = [data objectForKey:@"name"];
    
    
     NSDictionary* Dictionary = [NSDictionary dictionaryWithObjects:message forKeys:name];
    
    
     for (NSString* Key in [Dictionary allKeys]){
        NSLog(@"%@ %@",Key,[Dictionary objectForKey:Key]);
    
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to use MBProgressHUD the following way: In my method I call
I have defined my bindings in the following way <jaxb:bindings node=xs:complexType[@name='Parent']> ........... <jaxb:bindings node=xs:element[@name='children']>
currently I am using garchfit in the following way : spec=garchset('Distribution','T', 'R',1,'P',1,'Q',1); [spec, errors,
I have data that's setup the following way: array( 0 => array( 'data_id' =>
Is there a way to get jQuery to work in the following way? I
I set a header in the following way: header('Content-Length: ' . filesize($strPath)); On my
Currently I'm checking it in the following way: if (Environment.UserInteractive) Application.Run(new ServiceControllerForm(service)); else ServiceBase.Run(windowsService);
I've been using ShowDialog() in following way for all my new Windows. SomeGui test
I try to do it in the following way: public String getValue(String service, String
I tried the following way ...... public class ProductBean { public double LOWER_RATE; public

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.