How can I create a group of objects where the query_id is equal within a .each $?
Object {id_pergunta: "63", resposta: "não", qtd: "5"}
Object {id_pergunta: "63", resposta: "sim", qtd: "19"}
Object {id_pergunta: "64", resposta: "não", qtd: "19"}
Object {id_pergunta: "65", resposta: "A", qtd: "12"}
Object {id_pergunta: "65", resposta: "B", qtd: "1"}
Object {id_pergunta: "65", resposta: "C", qtd: "2"}
Object {id_pergunta: "65", resposta: "D", qtd: "3"}
Object {id_pergunta: "65", resposta: "E", qtd: "1"}
Object {id_pergunta: "66", resposta: "não", qtd: "11"}
Object {id_pergunta: "66", resposta: "sim", qtd: "8"}
Example: In this case the two id's are the same and would be placed on the same object.
[{id_pergunta: "63", resposta: "não", qtd: "5"},{id_pergunta: "63", resposta:"sim", qtd: "19"}]