I have data which is Array of Json Objects, I need to pass this as MultiPart Form Data. The data which i need to post is below :
{
"name": "KIMS EKM",
"latitude": "8.5605418",
"longitude": "76.8810471",
"state": "Kerala",
"district": "Thiruvananthapuram",
"city": "Leela Infopark",
"landmark": "Kazhakuttom",
"phone": "7293318484",
"email": "aswin.as@velosit.in",
"admin_name": "Aswin",
"admin_phone": "7293318484",
"admin_email": "aswin.a.s@velosit.in",
"departments": [{
"id": 1,
"is_sunday": 1
}, {
"id": 2,
"is_sunday": 1
}, {
"id": 3,
"is_sunday": 1
}, {
"id": 4,
"is_sunday": 1
}, {
"id": 5,
"is_sunday": 1
}, {
"id": 6,
"is_sunday": 1
}, {
"id": 7,
"is_sunday": 1
}, {
"id": 8,
"is_sunday": 1
}, {
"id": 9,
"is_sunday": 0
}, {
"id": 10,
"is_sunday": 0
}, {
"id": 11,
"is_sunday": 0
}],
"all_day_service": [3, 4, 5],
"emergency_services": [5],
"special_services": ["BPD", "HCDX"],
"accreditations": [2, 3]
}
Here the exact keys are used as params for multipart form Data. There are image needed to be posted, But the real problem is described below.
I have posted MultiPart form datas, but posting array of json objects is what i find tough. How can the "departments" & "all_day_service" field can be posted ?