jsonbject getString() method returns null : <p>I have a json data that looks like the following:</p>

<pre><code>{"bills":[{"BillID":"379","BillName":"Credit Card","Amount":"$700.00","PayType":"Auto","Status":"Not Due","DateDue":"2017-03-15","Title":"DUE!","BillSchedule":"90","BillNote":"Test","BillCategory":"Home Expense\/Utilities\/Gas"}]}
</code></pre>

<p>When I do the code below in Android Studio</p>

<pre><code>        JSONObject jsonObject = new JSONObject(result);
        jsonArray = jsonObject.getJSONArray("bills");

        for (int i = 0; i &lt; jsonArray.length(); i++) {
            JSONObject jsonOBject = jsonArray.getJSONObject(i);

            String billID = jsonOBject.getString("BillID");
            String billName = jsonOBject.getString("BillName");
            String billAmount = jsonOBject.getString("Amount");
            String payType = jsonOBject.getString("PayType");
            String billStatus = jsonOBject.getString("Status");
            String billDueDate = jsonOBject.getString("DateDue");
            String title = jsonOBject.getString("Title");
            String billSchedule = jsonObject.getString("BillSchedule");
            String billNote = jsonOBject.optString("BillNote");
            String billCategory = jsonObject.optString("BillCategory");

            BillObject data = new BillObject(billID,billName,billAmount, payType, billStatus,billDueDate, title, billSchedule, billNote, billCategory);

            data_list.add(data);
        }
</code></pre>

<p>It raises an Json exception stating there is "no value for BillSchedule". As  you can see by the Json data the BillSchedule field is being populated. Can someone help me figure this out, I don't know what I am missing.</p>
