如何优雅地将以下内容转换为 JSON,以便“数据”中的每个元素(即 1、2、3、4 和 5)都是独立的,并且无需使用 str_replace 或 preg_replace 即可轻松遍历?
{
"status":"success",
"data":{
"1":"this is an element",
"2":"this is an element",
"3":"this is an element",
"4":"this is an element",
"5":"this is an element",
}
}