I need to get all the objects in one Coulomb in parse. say for instance i have class in parse with the coulombs : City, StreetCode , Suburb. Now i want all the objects under City in an array.
The array should add all the objects under City:
Should return Array :City1,City2,City3,City4 etc.
Ive found this code to get all the objects in the Class:
PFQuery *query = [PFQuery queryWithClassName:@"StreetCodes"];
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error)
{
if (!error)
{
NSLog(@"%@",allObjects);
// The find succeeded. The first 100 objects are available in objects
} else
{
// Log details of the failure
NSLog(@"Error: %@ %@", error, [error userInfo]);
}
}];
but this code returns :
<StreetCodes: 0x7c1d76e0, objectId: dpFuJgeRnB, localId: (null)> {\n City = KWANOBUHLE;\n StreetCode = 6242;\n Suburb = \"10TH AVENUE\";\n}",
"<StreetCodes: 0x7c638020, objectId: OE9MtOGpVd, localId: (null)> {\n City = KWANOBUHLE;\n StreetCode = 6242;\n Suburb = \"1ST AVENUE\";\n}",
"<StreetCodes: 0x7c1cf970, objectId: 16TMG5V3jS, localId: (null)> {\n City = DURBAN;\n StreetCode = 4091;\n Suburb = \"45TH CUTTING\";\n}",
"<StreetCodes: 0x7c1c1dd0, objectId: 0Vk6oav0Zt, localId: (null)> {\n City = RIVERSDALE;\n StreetCode = 6670;\n Suburb = AALWYNFLEUR;\n}",
"<StreetCodes: 0x7c1db4e0, objectId: EVYUUWzTB7, localId: (null)> {\n City = BLOEMFONTEIN;\n StreetCode = 9301;\n Suburb = AANDRUS;
This returns all the objects in the class witch is added into the array . How do I use this ? Because I just want the City Coulomb objects.
Please help or provide me with some sample code