I am writing a steam bot and am trying to check, if one of the items in a trade is worth below 1 USD. I need to access the "pass" variable, but it never works. Can someone help?
    var receive = offer.itemsToReceive;
    var pass = true;
    receive.forEach(function(id) {
      var args = id.split(",");
      market.getItemPrice("some app id", some item name).then(function(result) {
        var json = JSON.parse(JSON.stringify(result)); // returns e.G $0.08
        var price = parseFloat(json.median_price.substring(1));
        if(price*100 < 100) {
           pass = false;
        }
      });
    });
 
    