Create an object for each group of equal ids

Asked

Viewed 31 times

1

how can I create a single object containing the data when the question id is equal and within a $ each loop ?

inserir a descrição da imagem aqui

  • Use Array: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push

  • in case I want to create an array for each example id_question would id 63 where an array containing the id_question would answer yes and no and its quantities. the same should happen to the others where I would have 4 objects , one being the data of the 63 other of the 64 , more one of the 65 and one of the 66, understood?

  • Place the array code with the various questions as well as the expected output, to be easy to answer the question

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.