Query regarding dropdown value post as response

Is there any way we can post the value from the dropdown after clicking on submit button. I was trying with the adaptive card for teams but somehow it is not working.
We basically want to print the selected value as a response from the dropdown after clicking on submit button.
Please find the code below:

var msg = {
“type”: “message”,
“attachments”: [
{
“contentType”: “application/vnd.microsoft.card.adaptive”,
“content”: {
“type”: “AdaptiveCard”,
“version”: “1.0”,
“body”: [
{
“type”: “Input.ChoiceSet”,
“id”: “CompactSelectVal”,
“label”: “What color do you want? (compact)”,
“style”: “compact”,
“isRequired”: true,
“errorMessage”: “This is a required input”,
“placeholder”: “Please choose”,
“choices”: [
{
“title”: “Red”,
“value”: “1”
},
{
“title”: “Green”,
“value”: “2”
},
{
“title”: “Blue”,
“value”: “3”
}
]
}
],
“actions”: [
{
“type”: “Action.Submit”,
“title”: “OK”,
“data”: {
“msteams”: {
“type”: “messageBack”,
“displayText”: “Red”,
“text”: “text to bots”,
“value”: “{“bfKey”: “bfVal”, “conflictKey”: “from value”}”
}
}
}
]
}
}
]
};
print(JSON.stringify(msg));