You should really do more research on the Gripen E, the Jas 39. It is in some areas not inferior to F-35 at all. Go through some youtube video comparisons and see for yourself. It's probably the closest you get to the F-35 out there today. It seems you are overrating F-35 quite a bit imo. Or underrating Jas 39, take your pick. (And btw, youtube videos are not always agreeing with each other either).
And when we know the Swedish plane is a lot cheaper, you definitely get more value for your money with it. It's another reason why more countries today will go for Sweden's plane. This plane definitely gets the job done, it is that good.
We, yes I'm a Norwegian, that's why I mention Norway twice in my posts, we have indeed in our country compared the two (we have 52 F-35s, getting our last badge these days). Although we find F-35 slightly a better fighter jet in total, it is just by the narrowest of margins. In a couple of areas Jas 39 is in fact slightly "better".
If we would have been given the choice again today, we would most likely have chosen Gripen, for the cost, and for the total package (it's not that we can't afford the F-35s..). We have pilots and military personell not arguing with that. We love F-35, don't get me wrong, but Jas 39 was more of an unknown capacity when we ordered the F-35s. Today we know what Jas 39 Gripen stands for, and we would love to support our friends, allies and neighbours. It's a great fighter jet, and a great choice.
We can't trust America to be our allies anymore. Trump even mentioned recently to have a killswitch in their F-35s, just in case... An insane comment btw.