オブジェクトの配列を配列に変換します。オブジェクトの配列を配列に変換します。
私がJavaScriptで作成した配列はarray.pushの関数に基づいています。そこで私は、オブジェクトの配列を持って、そして私はJSON.stringify(myarrayの)を使用して配列にそれを変換:それを変換するにはどうすればよい
[PensionLimit] =>
[
{"member":1,"pension_name":"1A","min":"N/A","max":"N/A","actual":0,"pension_type":"4","result":"N/A"},
{"member":1,"pension_name":"1B","min":"N/A","max":"N/A","actual":0,"pension_type":"4","result":"N/A"},
{"member":1,"pension_name":"1C","min":"N/A","max":"N/A","actual":0,"pension_type":"4","result":"N/A"},
{"member":2,"pension_name":"2A","min":"N/A","max":"N/A","actual":1,"pension_type":"4","result":"N/A"},
{"member":2,"pension_name":"2B","min":"N/A","max":"N/A","actual":0,"pension_type":"4","result":"N/A"},
{"member":2,"pension_name":"2C","min":"N/A","max":"N/A","actual":2000,"pension_type":"4","result":"N/A"},
{"member":3,"pension_name":"3A","min":"N/A","max":"N/A","actual":0,"pension_type":"4","result":"N/A"},
{"member":4,"pension_name":"4A","min":"N/A","max":"N/A","actual":0,"pension_type":"4","result":"N/A"}
]
?
私の予想される出力は次のとおりです。
[PensionLimit] => Array
(
[1] => Array
(
[member] => 1
[pension_name] => "1A"
[min] => "N/A"
[max] => "N/A"
[actual] => 0
[pension_type] => "4"
[result] => "N/A"
)
[2] => Array
(
[member] => 1
[pension_name] => "1B"
[min] => "N/A"
[max] => "N/A"
[actual] => 0
[pension_type] => "4"
[result] => "N/A"
)
[3] => Array
(
[member] => 1
[pension_name] => "1C"
[min] => "N/A"
[max] => "N/A"
[actual] => 0
[pension_type] => "4"
[result] => "N/A"
)
[4] => Array
(
[member] => 1
[pension_name] => "2A"
[min] => "N/A"
[max] => "N/A"
[actual] => 0
[pension_type] => "4"
[result] => "N/A"
)
[5] => Array
(
[member] => 1
[pension_name] => "2B"
[min] => "N/A"
[max] => "N/A"
[actual] => 0
[pension_type] => "4"
[result] => "N/A"
)
[6] => Array
(
[member] => 1
[pension_name] => "3A"
[min] => "N/A"
[max] => "N/A"
[actual] => 0
[pension_type] => "4"
[result] => "N/A"
)
)
あなたの "期待される出力"はJavaScriptの配列ではありません – RomanPerekhrest
彼はまたPHPで質問をしましたが、セットアップがPHPで動作すると思います。 – Andreas
exp.edit()はform.serialize()配列のタイプ –