title: Parsing JSON to custom ArrayList, only returning last item?
body: <p>I'm finding this a bit odd, I'm parsing some JSON from a file in my /assets folder. I have set up a custom ArrayList. Now when I try and add data from the ArrayList to a listview, or a spinner (Same adapter) it only shows the last item. Here is my code:</p>
  
  <p>My parsing method:</p>
  
  <pre><code>public ArrayList&lt;ShopName&gt; parseJSON(String json) {
  
      ArrayList&lt;ShopName&gt; shop = new ArrayList&lt;&gt;();
      ShopName item = new ShopName();
  
      Log.d(TAG, json);
      try {
  
          JSONArray jArray = new JSONArray(json);
  
          for (int i=0; i &lt; jArray.length();i++) {
              JSONObject jObject = jArray.getJSONObject(i);
              item.setFromCurrency(jObject.getString("from"));
              item.setToCurrency(jObject.getString("to"));
              item.setRate(jObject.getString("cost"));
              data.add(item);
          }
      } catch (JSONException jen) {
          jen.printStackTrace();
      }
      return shop;
  }
  </code></pre>
  
  <p>I'm not quite sure where my error is. Am I parsing it incorrectly, maybe, storing it incorrectly? I have a feeling it's my ArrayList but I'm sure what I should be doing to fix it, I've tried using different Adapters, and searching StackOverflow but they all have difference issues so it's hard to narrow now.</p>
  
  <p>I would appreciate your help on this. Thank you.</p>