code: public User parseArray(User user, JSONObject response) throws JSONException {
          JSONArray productArray = response.getJSONArray("products");
          user.products  = new String[productArray.length()];
          for(int i = 0; i < productArray.length(); i++) {
              user.products[i] = productArray.getString(i);
          }
  
          JSONArray exchangesArray = response.getJSONArray("exchanges");
          user.exchanges = new String[exchangesArray.length()];
          for (int j = 0; j < exchangesArray.length(); j++){
              user.exchanges[j] = exchangesArray.getString(j);
          }
  
          JSONArray orderTypeArray = response.getJSONArray("order_types");
          user.orderTypes = new String[orderTypeArray.length()];
          for(int k = 0; k < orderTypeArray.length(); k++){
              user.orderTypes[k] = orderTypeArray.getString(k);
          }
  
          return user;
      }
docs: Parses array details of product, exchange and order_type from json response.
  @param response is the json response from server.
  @param user is the object to which data is copied to from json response.
  @return User is the pojo of parsed data.