I have an array of 300 objects which each object contain many parameters and I want to loop through the array to create a JSON object which contain only two parameters. my objects were created from this json structure in the array :
"publicationId": 13,
"name": null,
"code": "FIGA_20190516",
"parutionDate": "2019-05-16",
"quadri": "FIGA",
"ratio": null,
"numero": "0",
"createdAt": "2019-06-18 21:29:21",
"nbPages": 0,
"search": 1,
"down": 1,
"thumb_height": 0,
"quartPageWidth": 0,
"quartPageHeight": 0,
"pdfHeight": "0",
"pdfWidth": "0",
"PDF": "2019-06-18 21:29:21",
"XML": null,
"SendKM": "2019-06-18 21:29:21",
"KM": null,
"Melody": null,
"filename": null,
"SendNormalize": null,
"Normalized": null,
"librelioSubTitle": null,
"SendProcessArticle": null,
"ProcessedArticles": null,
"melodyCallBackUrl": null,
"htmlMilibris": false,
"htmlHarry": false,
"sendProcessLibrelio": null,
"processedLibrelio": null,
"id": 77066,
"_solrDocument": {},
"_repository": "FIGA/2019/05/FIGA_20190516/"
and I want to loop through the array to create a JSON object with this struct :
"availableParutions" : {
id : createdAt,
id : createdAt,
id : createdAt
}
I really appreciate your help guys !
Codable?