title: How To Fetch All Available JSON Data inside a index of JSON data
body: <p>I am trying to fetch the name and price from JSON data as shown below but it only gives me one name and one price as I have to use the index to fetch a particular data how can I fetch all the available name and price from the JSON data</p>
  <p>here is my function</p>
  <pre><code>void getData() async {
  http.Response response = await http.get(
      &quot;API LINK&quot;);
  if (response.statusCode == 200) {
    String data = response.body;
  
    var decodeData = jsonDecode(data);
  
    var name = decodeData['entry'][0]['gsx\$name'];
    var price = decodeData['entry'][0]['gsx\$price'];
  
    print(name);
    print(price);
  }
  </code></pre>
  <p>}</p>
  <p><a href="https://i.stack.imgur.com/ks9Qo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ks9Qo.png" alt="enter image description here" /></a></p>