Pushing items into array not working inside of jquery POST [duplicate]

my post was just deleted and they linked AJAX asynchronosity which didn’t help at all and is completely unrelated to my problem.

My problem is that I cannot push ITEMS, into my array using .push when it’s inside of a POST and not ajax…

CODE:

var rolearray = [];
$.post(
  "https://URL/getRoleData", 
  JSON.stringify({ businessid: $(this).data('businessid') }), 
  function(roles){
    $(roles).each(function(e) {
      rolearray.push({label: roles[e].role, value: roles[e].role})
    })
  }
)

This time please don’t just dismiss it. Cause the thread linked didn’t help.

Also yes the post is returning data.. For each is working as intended but it won’t push my values after it’s returned the result.