这是我的字典:
Birthdate = "01-01-0001";
CareerField = 3;
Gender = 2;
"Interests[0].UserProfileId" = 19594;
"Interests[0].UserSurveyId" = 1;
SocialStatus = 2;
Studies = 3;
但是我希望兴趣键没有""。就像那样:
Birthdate = "01-01-0001";
CareerField = 3;
Gender = 2;
Interests[0].UserProfileId = 19594;
Interests[0].UserSurveyId = 1;
SocialStatus = 2;
Studies = 3;
更新: 利益我必须像阵列一样发送它们。
[dict setObject:self.birthdayDate forKey:@"Birthdate"]
[dict setObject:@(self.occupationPickerRow + 1) forKey:@"CareerField"];
for (int i = 0; i < [interestsArray count]; i++) {
NSString *stringSurveyId = [NSString stringWithFormat:@"%@%d%@", @"Interests[", indexCount, @"].UserSurveyId"];
NSString *stringUserProfileId = [NSString stringWithFormat:@"%@%d%@", @"Interests[", indexCount, @"].UserProfileId"];
[dict setObject:[interestsArray objectAtIndex:i] forKey:stringSurveyId];
[dict setObject:@([[[MZEngine sharedInstance] currentUserModel] userId]) forKey:stringUserProfileId];
indexCount++;
}