The problem is that getJSON is asynchronous.
console.log(operations) is executing before the JSON request has actually been completed. You can see this in the console.log where the undefined line will appear above the options.
Inside function(data) you need to call a processor instead of having the getOptionsJSON return options.
You could do this simply by
$.getJSON(window.location.pathname+'/ajaxRequest?ordernumber='+Ordernumber+'&'+Math.round(new Date().getTime()), function(data) {
if(data['articleID']) {
options = data['values_label_array'];
console.log(options) // returns {"1":"Option 1","2":"Option 2"}
processJSON(options );
}
});
function selectOptions(){
getOptionsJSON($(row).find('.ordernumber').val());
}
function processJSON(data) {
//do something with the JSON;
}