I have this Json that returns from the database, I need to consolidate data that is the same but I have no idea how to do it in jquery or php. If anyone has any suggestions Thanks!
{
"data":[
{
"nome_pesquisa":"teste",
"nr_pergunta":"1",
"pergunta":"a",
"qtd":"40"
},
{
"nome_pesquisa":"teste",
"nr_pergunta":"2",
"pergunta":"b",
"qtd":"29"
},
{
"nome_pesquisa":"teste",
"nr_pergunta":"2",
"pergunta":"b",
"qtd":"11"
},
{
"nome_pesquisa":"teste",
"nr_pergunta":"3",
"pergunta":"c",
"qtd":"3"
},
{
"nome_pesquisa":"teste",
"nr_pergunta":"3",
"pergunta":"c",
"qtd":"5"
},
{
"nome_pesquisa":"teste",
"nr_pergunta":"3",
"pergunta":"c",
"qtd":"2"
}
]
}