title: How to get all json values with newtonsoft
body: <p>I'm having a hard time getting through all the JSON values ​​of a string, can anyone help me?
  I'm only getting a single value, where am I going wrong?</p>
  
  <p>My codes</p>
  
  <pre><code>Dim address As String = "http://wsloterias.azurewebsites.net/api/sorteio/getresultado/1"
  Dim client As WebClient = New WebClient()
  Dim reader As StreamReader = New StreamReader(client.OpenRead(address))
  Dim json = (reader.ReadToEnd)
  
  Dim objs As RootObject = JsonConvert.DeserializeObject(Of RootObject)(json)
  Dim objsSorteio As Sorteio = JsonConvert.DeserializeObject(Of Sorteio)(json)
  
  
  For Each nums In objsSorteio.Premios
      MsgBox(nums.ToString)
  Next
  </code></pre>
  
  <p>Classes</p>
  
  <pre><code>Public Class Premio
      Public Property Faixa() As String
          Get
              Return m_Faixa
          End Get
          Set(value As String)
              m_Faixa = Value
          End Set
      End Property
      Private m_Faixa As String
      Public Property NumeroGanhadores() As Integer
          Get
              Return m_NumeroGanhadores
          End Get
          Set(value As Integer)
              m_NumeroGanhadores = Value
          End Set
      End Property
      Private m_NumeroGanhadores As Integer
      Public Property Valor() As Double
          Get
              Return m_Valor
          End Get
          Set(value As Double)
              m_Valor = Value
          End Set
      End Property
      Private m_Valor As Double
  End Class
  
  Public Class Sorteio
      Public Property NumSorteio() As Integer
          Get
              Return m_NumSorteio
          End Get
          Set(value As Integer)
              m_NumSorteio = Value
          End Set
      End Property
      Private m_NumSorteio As Integer
      Public Property Numeros() As List(Of Integer)
          Get
              Return m_Numeros
          End Get
          Set(value As List(Of Integer))
              m_Numeros = Value
          End Set
      End Property
      Private m_Numeros As List(Of Integer)
      Public Property Premios() As List(Of Premio)
          Get
              Return m_Premios
          End Get
          Set(value As List(Of Premio))
              m_Premios = Value
          End Set
      End Property
      Private m_Premios As List(Of Premio)
      Public Property Ganhadores() As List(Of Object)
          Get
              Return m_Ganhadores
          End Get
          Set(value As List(Of Object))
              m_Ganhadores = Value
          End Set
      End Property
      Private m_Ganhadores As List(Of Object)
  End Class
  
  Public Class RootObject
      Public Property NumeroConcurso() As Integer
          Get
              Return m_NumeroConcurso
          End Get
          Set(value As Integer)
              m_NumeroConcurso = Value
          End Set
      End Property
      Private m_NumeroConcurso As Integer
      Public Property Acumulou() As Boolean
          Get
              Return m_Acumulou
          End Get
          Set(value As Boolean)
              m_Acumulou = Value
          End Set
      End Property
      Private m_Acumulou As Boolean
      Public Property EstimativaPremio() As Double
          Get
              Return m_EstimativaPremio
          End Get
          Set(value As Double)
              m_EstimativaPremio = Value
          End Set
      End Property
      Private m_EstimativaPremio As Double
      Public Property ValorAcumulado() As Double
          Get
              Return m_ValorAcumulado
          End Get
          Set(value As Double)
              m_ValorAcumulado = Value
          End Set
      End Property
      Private m_ValorAcumulado As Double
      Public Property Data() As String
          Get
              Return m_Data
          End Get
          Set(value As String)
              m_Data = Value
          End Set
      End Property
      Private m_Data As String
      Public Property RealizadoEm() As String
          Get
              Return m_RealizadoEm
          End Get
          Set(value As String)
              m_RealizadoEm = Value
          End Set
      End Property
      Private m_RealizadoEm As String
      Public Property DescricaoAcumuladoOutro() As String
          Get
              Return m_DescricaoAcumuladoOutro
          End Get
          Set(value As String)
              m_DescricaoAcumuladoOutro = Value
          End Set
      End Property
      Private m_DescricaoAcumuladoOutro As String
      Public Property ValorAcumuladoOutro() As Double
          Get
              Return m_ValorAcumuladoOutro
          End Get
          Set(value As Double)
              m_ValorAcumuladoOutro = Value
          End Set
      End Property
      Private m_ValorAcumuladoOutro As Double
      Public Property DataProximo() As String
          Get
              Return m_DataProximo
          End Get
          Set(value As String)
              m_DataProximo = Value
          End Set
      End Property
      Private m_DataProximo As String
      Public Property ValorAcumuladoEspecial() As Double
          Get
              Return m_ValorAcumuladoEspecial
          End Get
          Set(value As Double)
              m_ValorAcumuladoEspecial = Value
          End Set
      End Property
      Private m_ValorAcumuladoEspecial As Double
      Public Property Arrecadacao() As Double
          Get
              Return m_Arrecadacao
          End Get
          Set(value As Double)
              m_Arrecadacao = Value
          End Set
      End Property
      Private m_Arrecadacao As Double
      Public Property Sorteios() As List(Of Sorteio)
          Get
              Return m_Sorteios
          End Get
          Set(value As List(Of Sorteio))
              m_Sorteios = Value
          End Set
      End Property
      Private m_Sorteios As List(Of Sorteio)
  End Class
  </code></pre>
  
  <p>I can not go through all the "Numeros" and also "Premios"</p>