code: private  QueueCursor updateCursorForDBObject(JSONObject dbObject, QueueCursor cursor) {
  
          if (dbObject == null) return cursor;
  
          Iterator<String> keys = dbObject.keys();
          if (keys.hasNext()) {
              String key = keys.next();
              cursor.setLastId(key);
              try {
                  cursor.setData(dbObject.getJSONArray(key));
              } catch (JSONException e) {
                  cursor.setLastId(null);
                  cursor.setData(null);
              }
          }
  
          return cursor;
      }
docs: helper extracts the cursor data from the db object