title: How to communicate object of json using blazor c#?
body: <p>This is my code here response variable will return the response of the json, now I want to add if statement according to the returned values but its throwing me errors. I tried many things but I don't understand how its done. Someone please help me</p>
  <pre><code>@code {
  
      private CountryTracker response;
  
      protected override async Task OnInitializedAsync()
      {
          response = await HttpClient.GetFromJsonAsync&lt;CountryTracker&gt;(&quot;http://ip-api.com/json/&quot;);
      }
  
      if(response?.country==&quot;Nepal&quot;){
            BlazorTimer timer = new(1000, 35);
          private int secondsLeft = 35;
      }
      else{
            BlazorTimer timer = new(1000, 15);
          private int secondsLeft = 15;
      }
  </code></pre>
  <p>Here I want to perform different action according to the json response, how can I do this plese help me. The object of response is country. I want to implement the operation of timer on the basic of country.</p>