convert array to javascript object – Jquery
I get an array that looks like this: var dateUnvailableCalendar = {{ datesUnvailable|json_encode|raw }}; and I want to transform it to look like this: { 'from': '2023-03-06 00:00', 'to': '2023-03-13 00:00' }, { 'from': '2023-03-01 00:00', 'to': '2023-03-01 00:00' }…