I'm having a tricky little problem here, the logic I should use for this kind of procedure is a bit tricky.
Well, it's the following:
I have an array with the following data:
var dados = [
{'id':1,'nome':'dom','horario1':'01:00','horario2':'02:00'},
{'id':1,'nome':'seg','horario1':'07:00','horario2':'08:00'},
{'id':1,'nome':'ter','horario1':'09:00','horario2':'10:00'},
{'id':1,'nome':'qua','horario1':'01:00','horario2':'02:00'},
]
I want to make the array run and all those that have the same time it joins the name, in the example above it would look like this:
var Retorno = [
{'id':1,'nome':'dom,qua','horario1':'01:00','horario2':'02:00'},
{'id':1,'nome':'seg','horario1':'07:00','horario2':'08:00'},
{'id':1,'nome':'ter','horario1':'09:00','horario2':'10:00'},
]
How can you help me out? I'm getting ugly here!