I have a NSArray having below data and want to convert it to NSDictionary in the format that follows. The array has only [0] and the data belongs to that index only. The reason why the dictionary should have this format is a web service that accepts only this format. The array fetches data from Core DB and then i have to send it to the web service.
<MatchDayChecklist: 0xa6a04c0> (entity: MatchDayChecklist; id: 0xa69eee0 <x-coredata://2A66067E-8B0D-4BAC-857D-E6C71906270C/MatchDayChecklist/p2> ; data: {
acceptDeclaration = 1;
actions = Df;
authorisedRep = 1;
awayAssociationId = 18;
awayClubId = 7;
awayTeamName = Sdf;
awayTeamRepName = Df;
awayTeamRepPosition = df;
createDate = "2014-03-19 09:09:13 +0000";
firstAidFacilityAccessible = 1;
groundMarkingsAcceptable = 0;
homeAssociationId = 18;
homeClubId = 7;
homeTeamName = E;
homeTeamRepName = Df;
homeTeamRepPosition = Df;
inspectionDate = "2014-03-19 09:08:00 +0000";
matchDayChecklistid = 1;
matchVenue = Sdf;
perimeterFencesFreeOfHazard = 1;
photo = "<relationship fault: 0xa7ae630 'photo'>";
photoThumbs = "<relationship fault: 0xa7ae880 'photoThumbs'>";
playSurfaceAcceptable = 0;
playerAreaFreeOfHazard = 0;
publicAreaFreeOfHazard = 0;
sprinkleCoverLevelled = 0;
stateAwayTeam = NSW;
stateHomeTeam = NSW;
submited = 2;
updateDate = "2014-03-19 09:09:13 +0000";
visibleDebrisRemoved = 0;
weatherSafeToPlay = 1;
})
Format of Dictionary:
@"homeAssociationID": 22,
@"homeClubID": 7,
@"homeTeamName": df,
@"awayAssociationID": 4,
@"awayClubID": 4,
@"awayTeamName": sfd,
@"matchVenue": sdf,
@"inspectionDateTime": 2014-03-19 09:08:00 +0000,
@"weatherSafeToPlay": 0,
@"playSurfaceAcceptable": 0,
@"visibleDebrisRemoved": 0,
@"groundMarkingsAcceptable": 0,
@"sprinklerCoverLevelled": 0,
@"perimeterFencesFreeOfHazard": 1,
@"publicAreaFreeOfHazard": 1,
@"playerAreaFreeOfHazard": 1,
@"firstAidFacilityAccessible": 0,
@"actions": (includeActionsAndPhotos ? actions : @""),
@"authorisedRep": 0,
@"acceptDeclaration": 1,
@"homeTeamRepName": sdf,
@"homeTeamRepPosition": sdf,
@"awayTeamRepName": df,
@"awayTeamRepPosition": sdf,
@"photos":
encodedImageArray,
please help.