我试图为 Rubrics 生成特定的 json,仅需要以下格式。
为什么我需要这个?
对于 SurveyJS,我正在使用 PHP 创建单元格 json
PHP 输出
Array
(
[Attendance] => Array
(
[0] => Array
(
[OUTSTANDING] => A
)
[1] => Array
(
[Satisfactory] => B
)
[2] => Array
(
[Needs Improvement] => C
)
[3] => Array
(
[Unacceptable] => D
)
)
[Punctuality] => Array
(
[0] => Array
(
[OUTSTANDING] => A
)
[1] => Array
(
[Satisfactory] => B
)
[2] => Array
(
[Needs Improvement] => C
)
[3] => Array
(
[Unacceptable] => D
)
)
)
我一直在努力实现和要求的输出
{
"Attendance": {
"OUTSTANDING": "A",
"Satisfactory": "B",
"Needs Improvement": "C",
"Unacceptable": "D"
},
"Punctuality": {
"OUTSTANDING": "A",
"Satisfactory": "B",
"Needs Improvement": "C",
"Unacceptable": "D"
}
}
慕斯王
郎朗坤