Hallo ich möchte das "reviews" JSON Objekt wider in JSOUP Elements zurückwandeln wie ginge das? "source" ist ein JSOUP ELEMTS Objekt.
Code:
private static void safe(Elements[][] source) throws JSONException {
JSONObject root = new JSONObject();
JSONArray reviews = new JSONArray();
for(int i =0; i < source.length; i++) {
JSONObject review = new JSONObject();
review.put(i+"main" , source[i][0].html());
review.put(i+"child" , source[i][1].html());
reviews.put(review);
}System.out.println(reviews);
}