I am getting an object array inside a arraylist that is also of Object type. I know within the very first index of the object array list I have a nested object array and I have to retrieve that array. How can I do this? Right now I am iterating over complete object array list which is not good as I know I have to retrieve the object array from the very first object list element.
List<String> resultList = new ArrayList<String>();
List<Object[]> listObj = (List<Object[]>)query.getResultList();
for(Object[] obj: listObj){
resultList.add(((String)obj[0]));
resultList.add(((String)obj[1]));
}