我有一个像这样的数组
[["ContactCreate", "PolicyCreate"], ["Page_1", "Page_3"], ["Page_2"]]
我想转置这个数组,但是如果我转置这个数组,这说
Uncaught exception: element size differs (1 should be 2)
现在我有这样大小的数组,无论如何,我可以用更大数组的大小填充nil
,然后可以转置吗?喜欢
[["ContactCreate", "PolicyCreate"], ["Page_1", "Page_3"], ["Page_2",nil]]
如果
[["ContactCreate", "PolicyCreate","contactCreate], ["Page_1", "Page_3"], ["Page_2"]]
然后必须是
[["ContactCreate", "PolicyCreate","contactCreate], ["Page_1", "Page_3",nil], ["Page_2",nil,nil]]