-2

Following is my JSONArray data How do I convert this to a StringArray?

 private void getTextfromalledittext()
    {
       String textpoint[]=new String[editTextList.size()];
       int i=0;
       for(EditText editText:editTextList)
       {
            textpoint[i]=editText.getText().toString();
            i++;
       }

   }
Ramesh R
  • 7,009
  • 4
  • 25
  • 38
  • Hi, please read [How do I ask a good question?](https://stackoverflow.com/help/how-to-ask) and edit your question accordingly – Dor Jul 02 '19 at 07:33
  • 3
    Possible duplicate of [Convert String array to json in android](https://stackoverflow.com/questions/18327640/convert-string-array-to-json-in-android) – Dor Jul 02 '19 at 07:35
  • show the example of the input data and output you want from it. – Vladyslav Matviienko Jul 02 '19 at 07:36

1 Answers1

0

Implement like this -

private void getTextfromalledittext(){
   String textpoint[]=new String[editTextList.size()];
   int i=0;
   for (EditText editText:editTextList) {
       textpoint[i]=editText.getText().toString();
       i++;
   }
   JSONArray jsonArray = new JSONArray(Arrays.asList(textpoint));
}
Zun
  • 1,553
  • 3
  • 15
  • 26
Anupam
  • 2,845
  • 2
  • 16
  • 30