How do I remove a specific element from a JSONArray?

后端 未结 9 1753
执笔经年
执笔经年 2020-11-29 08:18

I am building one app in which I request a PHP file from server. This PHP file returns a JSONArray having JSONObjects as its elements e.g.,

[ 
  {
           


        
9条回答
  •  旧时难觅i
    2020-11-29 08:40

    i guess you are using Me version, i suggest to add this block of function manually, in your code (JSONArray.java) :

    public Object remove(int index) {
        Object o = this.opt(index);
        this.myArrayList.removeElementAt(index);
        return o;
    }
    

    In java version they use ArrayList, in ME Version they use Vector.

提交回复
热议问题