Dear All,
As I would like to create json as below format
“`
{
“data”: [
{
“title”: “After getting a COVID-19 Vaccine”,
“content”: [
{
“list”: “You may have some side effects, which are normal signs that your body is building protection.”
},
{
“list”: “Following symptoms can take place, and it usually resolves within 2 to 3 days.”
},
{
“list”: “Common Side Effects pain, redness, swelling, warmth, nausea, muscle pain, tiredness, headache”
}
]
},
{
“title”: “After getting a COVID-19 Vaccine”,
“content”: [
{
“list”: “You may have some side effects, which are normal signs that your body is building protection.”
},
{
“list”: “Following symptoms can take place, and it usually resolves within 2 to 3 days.”
},
{
“list”: “Common Side Effects pain, redness, swelling, warmth, nausea, muscle pain, tiredness, headache”
}
]
}
]
}
The information is from mysql select command:
`SELECT (tb_helpinfo.title_eng) as title,(tb_helpdetail.content_eng) as content FROM tb_helpinfo INNER JOIN tb_helpdetail ON tb_helpinfo.id = tb_helpdetail.helpinfo_id
![(
How could I make json like that from mysql information?