EDIT: Based on your comment below, your data looks the code below.
There's a problem. It is not valid for an HTML ID attribute to start with a number. IDs must begin with a letter.
I'll show you the solution anyway, but you should fix the IDs.
var array = [{respID:1, respName:null},
{respID:2, respName:null},
{respID:3, respName:null},
{respID:4, respName:null},
{respID:5, respName:null}
];
$.each(array, function(i,val) {
$('#' + val.respID).attr("selected", "selected");
});
Now this will give you the value of respID in each iteration of the loop.
But again, HTML IDs can not start with a number. I'd suggest updating your HTML ID attributes to something like id_5 instead of 5.
<select>
<option id="id_1" value="some value">some text</option>
<option id="id_2" value="some value">some text</option>
<option id="id_3" value="some value">some text</option>
...
</select>
Then you would do this:
$.each(array, function(i,val) {
$('#id_' + val.respID).attr("selected", "selected");
});