Suppose I have an array like this:
var aaa = [
{"id": 1, "text": "Ann"},
{"id": 2, "text": "Bob"},
{"id": 3, "text": "Carol"},
{"id": 4, "text": "Carol"},
]
If I want to extract only the IDs of elements with text as "Carol", how can I achieve that?