i have a json with some dates that looks like this for example
jsonEvents = [
{'event_name':'event1','event_start':'2013-10-23','event_stop':'2013-10-29'},
{'event_name':'event2','event_start':'2013-10-23','event_stop':'2013-10-25'}
];
i want to use underscoreJS to cut this events into half (just to make the idea more simple). What i want as output would look like this.
jsonEvents = [
{'event_name':'event1','event_start':'2013-10-23','event_stop':'2013-10-26'},
{'event_name':'event1','event_start':'2013-10-26','event_stop':'2013-10-29'},
{'event_name':'event2','event_start':'2013-10-23','event_stop':'2013-10-24'},
{'event_name':'event2','event_start':'2013-10-24','event_stop':'2013-10-25'}
];
I hope i can do this in a simple way, i am working on an angularJS project and i hope underscoreJS class can do this. Thank you very much.