log(_.map(businessOpenSlots, weekday => {
return _.spread(_.union)(_.map(weekday, slot => {
return this.getTimeStops(slot.open, slot.close);
}))
} ))
This is code above is printing below. However, instead of 0..4, I want to key to be weekday.
Not sure how to best achieve this.
the businessOpenSlots data is below
{
"friday":[
{
"open":"0900",
"close":"1700"
}
]"monday":[
{
"open":"0800",
"close":"1530"
},
{
"open":"1730",
"close":"1930"
}
]"thursday":[
{
"open":"0900",
"close":"1700"
}
]"tuesday":[
{
"open":"24hrs",
"close":"24hrs"
}
]"wednesday":[
{
"open":"0900",
"close":"1700"
}
]
}

