To load a JSON file in Blazor, refer to the following code.
<script src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous"></script>
<script type="text/javascript" src="object.json"></script>
<script>
$.getJSON("object.json", function (json) {
console.log(json);
});
</script>
Share with