Hi
i am getting couchbase list (bucket name is “test”) from my code as below
System.out.println("couchbaseList >>>>>>>>>>" + couchbaseList);
for (N1qlQueryRow row : couchbaseList) {
JsonObject jsonobj = row.value();
System.out.println("jsonobj " + jsonobj);
…
output
couchbaseList >>>>>>>>>>[{"test":{"empname":"Amit","empid":100,"salary":50000,"age":24}}, {"test":{"empname":"Santosh","empid":101,"salary":25000,"age":28}}, {"test":{"empname":"Abhishek","empid":102,"salary":35000,"age":30}}, {"test":{"Salary":40000,"EmpName":"Akash"}}, {"test":{"Age":28,"EmpName":"Rekha"}}]
jsonobj {"test":{"empname":"Amit","empid":100,"salary":50000,"age":24}}
jsonobj {"test":{"empname":"Santosh","empid":101,"salary":25000,"age":28}}
jsonobj {"test":{"empname":"Abhishek","empid":102,"salary":35000,"age":30}}
jsonobj {"test":{"Salary":40000,"EmpName":"Akash"}}
jsonobj {"test":{"Age":28,"EmpName":"Rekha"}}
How to iterate through jsonobj to get the empid in java ? please guide me