So I am trying to pull data from my database and essentially create a JSON file that looks like this. I know of that I can use my_json_object.put(); but that seems to only work for String, String. I and I want to create the value with 2 entries, and the second entryw ill actually be an array of many values. How can I achieve that? Thanks guys.
{"value": {
"name": "History",
"values": [
{"front": "History Market", "back": " It is the world of the world that the world could not say that", "color": "Yellow"},
{"front": "History Market", "back": " It is the world of the world that the world could not say that", "color": "Red"},
{"front": "History Market", "back": " It is the world of the world that the world could not say that", "color": "Purple"},
{"front": "History Market", "back": " It is the world of the world that the world could not say that", "color": "Blue"},
{"front": "History Market", "back": " It is the world of the world that the world could not say that", "color": "Blue"}
]}}
Create your current jsonObject as :