Click here to Skip to main content
15,889,176 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am unable to categorize my data which i am able to get from JSON in swift.

like for example: if i am having a list of data. i like to seperate my data based on one Column value. if i am having a Column named as Status under this column im having different status like: New, Accepted, Declined.each status will have a set of records.

so like to divide my data from the JSon request and display it using UItableView.

json formate:

CSS
{
FileID: 27
Client: {
  PersonName: "jhjb"
  PersonAddress: {
    Address1: "j"
    Address2: "kb"
    }
 PrimaryEmail: ""
 SecondaryEmail: ""
 HomePhone: ""
}
FileStatus: "New"
}



here is the line which i am using:

self.filteredObjects = [self.dataList filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"type == %d", segmentedControl.selectedSegmentIndex]];


please help me out.

Thanks
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900