我的数据库表中有一个列名称Payment_data。数据使用json_encode()存储为JSON数组。
我想解析数据表中的JSON数组。但是我失败了。
这是我要访问的数据
付款数据列
我将数据结构更新为此。
Array[2][
{
"po_id": 43,
"full_name": "Dawn Zulita",
"level": "organization",
"payment_data": {
"product_id": "184",
"product_name": "Grading Org Product",
"student_name": {
"0": "Eloise Phillips",
"1": "Lara vel"
}
},
"date_purchase": "2018-08-10 10:38:08"
},
{
"po_id": 42,
"full_name": "QWerty You",
"level": "school",
"payment_data": {
"product_id": 185,
"product_name": "School Owner Manual Payment School Owner Manual Payment",
"student_name": {
"0": "Jai Who",
"1": "Charlie Putt",
"2": "Kevin Young"
}
},
"date_purchase": "2018-08-09 14:53:35"
}
]
我现在可以访问payment_data.product_name
{
data: 'payment_data.product_id'
},
{
data: 'payment_data.product_name'
},
但问题是我无法访问payment_data.student_name
错误返回未定义索引
{
data: 'payment_data.student_name'
},