0
I’m having a little bit of a problem here, the logic I should use for this kind of procedure is a bit complicated.
Well, here’s the thing:
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 to be traversed and everyone who has the same time it joins the name, in the example above 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'},
]
There’s a way you can help me Please, I’m getting ugly here!
Thanks guy, I managed to solve otherwise but not too different, needed a little more lines of code but worked the same way, for my system in case
– Tales Born
my answer ta up there, but still I will mark yours as the one that solved the problem thanks friend
– Tales Born