In MongoDB, I have a object array and the object has key value pair. As per given below sample, the array contains questions tag and there can be many answers for the question tag. Hence I want to convert the value field to array. Can someone help me and provide me the query. Thanks.
"custom_questions": [
{
"question": "Time",
"order": "5",
"isRequired": "true",
"type": "text",
"createdDate": "11-11-2022",
"value": "IST"
},
{
"question": "Are you student",
"order": "1",
"isRequired": "true",
"type": "text",
"createdDate": "14-11-2022",
"value": "Yes"
},
{
"question": "Are you from",
"order": "1",
"isRequired": "true",
"type": "Textbox",
"value": "India",
"createdDate": "18-11-2022"
}]