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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:57:46+00:00 2026-06-03T09:57:46+00:00

I have a json array with certain objects : first name , last name,

  • 0

I have a json array with certain objects : first name , last name, unique id. I am able to parse them and save them in dictionary and also check them for NULL conditions.

I have created a table in which i am able to display the names. Also, i have one button in each row as well and i have tagged them. What i want is that when i click the button, i am able to see the unique id fetched from server in my console. I need to pass this unique id to next view as using this unique id would help me to display view corresponding to that id on server.

Click here to see what I have done so far

I have made some changes by adding this to my viewDidLoad method:

  for(NSDictionary *items in infos)
      {
          ....
          ....
         for(int i =0; i < len; i++)
          {
             ...
             ...
             ...


             for(NSDictionary *newItems in infoArray)
               {
                ...
                ...

                NSString *folks_IdRcv = [[items objectForKey:strr]objectForKey:@"folks_id"];
                NSLog(@"FolksID = %@", folks_IdRcv);

                NSString *folksIDString = [NSString stringWithFormat:@"%@", folks_IdRcv, nil];
                NSLog(@"folkid_display=%@", folksIDString);


                if((fName && lName && email_Id && number_id) && displayName && folksIDString != NULL)
                     {

                        ...
                        ...                            
                        [folksIDArray insertObject:folksIDString atIndex:ii];
                NSLog(@"FolksID String Name = %@", [folksIDArray objectAtIndex:(ii)]);
                ii++;
                                }
                              }
                           }
                        } 

NSMutableArray *nArray = [[NSMutableArray alloc]initWithCapacity:len];


for(int j =0; j<len ;j++)
   {

      ...
      ... 
      [nArray addObject:[folksIDArray objectAtIndex:j]];
      NSLog(@"FID Element=%@", nArray);
}

self.infos = mArray;   
[super viewDidLoad];
}

And for this particular code, i am getting the following response:

FID Element=(
400386528950544,
162622322666106,
643171434889706
)

Now, I have a table view in which i have one button for each row and i am able to display the first and last names in each row. What I want now is that whenever I click the button, the unique id for that particular name should be saved in the tag so that i can send that id to the server on button click action.

Please help me out.

  • 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-03T09:57:49+00:00Added an answer on June 3, 2026 at 9:57 am

    Here, I assume that you can make array of unique id array and this array should be declare in .h file or should be class member. Than use following code.

    -(IBAction)buttonClicked1:(id *)sender{
      NSString *UIDString = [uidarray objectAtIndex:[sender tag]]; // uidarray is  unique id  array 
      NSLog(@"uid for particular button=%@", UIDString);// this will give you kid for button that you tapped or clicked.
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have this JSON: var projects_array = new Array( {name:myName1, id:myid1, index:1}, {name:myName2, id:myid2,
I have a php file somejson.php that echos a json encoded array {jsonone:first json,jsontwo:second
I have a JSON array with ActiveRecord objects. These objects can be reconstructed using
I have a JSON string array of objects like this. [{id:4,rank:adm,title:title 1}, {id:2,rank:mod,title:title 2},
I have an array of objects which I need placed in a certain order,
I have a JSON array like this [{Email:someone@some.com,Name:ACO,Groups:[MOD_SW,MOD_PI,MOD_GE],Id:63,Url:aco}, {Email:someone@some.com,Name:Agpo,Groups:[MOD_PI],Id:22,Url:agpo}, {Email:someone@some.com,Name:Akatherm,Groups:[MOD_SW],Id:64,Url:akatherm}, {Email:someone@some.com,Name:Albrand,Groups:[MOD_PI,MOD_GE],Id:23,Url:albrand}] I want to
I have a JSON array like this: { forum:[ { id:1, created:2010-03-19 , updated:2010-03-19
I have a JSON array like below: var jsonArray = [{k1:v1},{k2:v2},{k3:v3},{k4:v4},{k5:v5}] I don't know
I have a two dimensional JSON array where each element contains several attributes. The
I have to loop in a JSON array to get some informations in node

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.