I am trying to iterate through my json file and get required details here is my json
{
\"000\": {
\"component\": \"c\",
\"determinantType\": \"dt\",
try this...
FileReader file = new FileReader("test.json");
Object obj = parser.parse(file);
System.out.println(obj);
JSONObject jsonObject = (JSONObject) obj;
Iterator iterator = jsonObject .iterator();
for(Iterator iterator = jsonObject.keySet().iterator(); iterator.hasNext();) {
String key = (String) iterator.next();
System.out.println(jsonObject.get(key));
}