Code example for JSONArray

Methods: get

0
        CheckBox checkBox2 = checkCheckBoxAtIndex(1, true);
        options.put(checkBox2.getText());
        assertEquals(options.toString(), child.get(field.getId()).toString());
 
        checkBox1.setChecked(false);
        assertEquals("two", ((JSONArray)child.get(field.getId())).get(0));
    } 
 
 
    private CheckBox checkCheckBoxAtIndex(int index, boolean checked) {
        CheckBox checkBox2 = ((CheckBox)view.getCheckBoxGroup().getChildAt(index));
        checkBox2.setChecked(checked);
        return checkBox2;
    } 
 
}