sqlite - fetch column name from json array -
i need column name json array , ccompare column name sqlite table , have alter table when column name dowsnot exists. i use code fetch column , column name sqlite code string searchquery = "select * " + mytable; cursor cursor = mydatabase.rawquery(searchquery, null ); jsonarray resultset = new jsonarray(); cursor.movetofirst(); while (cursor.isafterlast() == false) { int totalcolumn = cursor.getcolumncount(); jsonobject rowobject = new jsonobject(); for( int i=0 ; i< totalcolumn ; i++){ cursor.getcolumnname(i); here use "cursor.getcolumnname() " column name sqlitetable. like this possible fetch column name jsonarray example cursor.getcolumnname(resultset.getjsonarray(i); is possible, else give me solution column name of jsonarray value. have compare column names of jsonarray , sqlite table.