Я создаю приложение Rails 5.В этом приложении я подключился к API Календаря Google.Связь работает нормально, и я получаю список календарей обратно.Что мне нужно сделать, так это получить идентификатор и сводку этого объекта JSON, которые я получаю от Google.
Это то, что я получаю
[{
"kind": "calendar#calendarListEntry",
"etag": "\"1483552200690000\"",
"id": "xxx.com_asae@group.calendar.google.com",
"summary": "My office calendar",
"description": "For office meeting",
"location": "344 Common st",
"colorId": "8",
"backgroundColor": "#16a765",
"foregroundColor": "#000000",
"accessRole": "owner",
"defaultReminders": [],
"conferenceProperties": {
"allowedConferenceSolutionTypes": [
"hangoutsMeet"
]
}
},
{
"kind": "calendar#calendarListEntry",
"etag": "\"1483552200690000\"",
"id": "xxx.com_asae@group.calendar.google.com",
"summary": "My office calendar",
"description": "For office meeting",
"location": "344 Common st",
"colorId": "8",
"backgroundColor": "#16a765",
"foregroundColor": "#000000",
"accessRole": "owner",
"defaultReminders": [],
"conferenceProperties": {
"allowedConferenceSolutionTypes": [
"hangoutsMeet"
]
}
}]
Это то, что я хочу получить в итоге
[{
"id": "xxx.com_asae@group.calendar.google.com",
"title": "My office calendar",
}]
Цель этого состоит в том, что я хочу заполнить поле выбора с помощью плагина Selectize