1
I have this object
{
"alunos": [
{
"aluno": {
"id": 1,
"nome": "Genevieve Sipes",
"status": "Ativo"
},
"mensalidade": {
"status": "Débito"
}
},
{
"aluno": {
"id": 2,
"nome": "Greyson Herman",
"status": "Ativo"
},
"mensalidade": {
"status": "Débito"
}
},
{
"aluno": {
"id": 3,
"nome": "Yessenia Emmerich",
"status": "Ativo"
},
"mensalidade": {
"status": "Débito"
}
},]
}
And I need to turn him into something like this
[
{
nome: 'Genevieve Sipes',
status: 'Débito',
},
]
I tried to do it this way, but it didn’t work, someone knows how to do it ?
this.names = this.students.map(function(student){
console.log(student.aluno.nome);
return student.aluno.nome;
})
It is that I am using the semantic autocomplete and at the time of passing the data it $('.ui.search') . search({ source : content, searchFields : [ 'name ], searchFullText: false })
– Mateus Henrique
@Mateushenrique, I understand, the solution was useful to you, solved your problem?
– novic