1
have the following object:
alunos : { nome: 'teste',
idade: '15',
turma: 'turma 1'},
{ nome: 'teste2',
idade: '16',
turma: 'turma 2'},
{ nome: 'teste3',
idade: '12',
turma: 'turma 2'},
{ nome: 'teste3',
idade: '14',
turma: 'turma 4'},
{ nome: 'teste6',
idade: '13',
turma: 'turma 4'},
I need to create a new array where students.class equals ['class 1', 'class 2'], I tried to use the filter but could not.
You want to modify the class attribute, String for Array?
– N. Dias
I don’t want to filter the array where the class attribute is equal to 'class 1, or 'class 2'
– Elisangela Carla DE Souza
You will pass an array as a filter, and want to get an object?
– N. Dias
Is Students an Object? Could improve on that Json above, is confused.
– N. Dias
sorry, students is an array of objects, I typed incorrectly
– Elisangela Carla DE Souza