10
tengo la siguiente estructura matriz asociativa en JavaScriptConvertir matriz asociativa de matriz numérica
Array (
[-1] => Array (
catId : -1
[subCatId] => Array (
subCatId : -3
[0] => Array (
property : value
)
[1] => Array (
property : value
)
)
)
[-4] => Array (
catId : -4
[subCatId] => Array (
subCatId : -6
[0] => Array (
property : value
)
[1] => Array (
property : value
)
)
)
)
quiero convertir esto en matriz numérica, como este
Array(
[0] => Array(
catID : -1
[subCatId] => Array (
subCatId : -3
[0] => Array (
property : value
)
[1] => Array (
property : value
)
)
)
[1] => Array(
catID : -4
[subCatId] => Array (
subCatId : -3
[0] => Array (
property : value
)
[1] => Array (
property : value
)
)
)
)
He intentado usar,
var numeric_array = new Array();
for (var items in Array){
numeric_array=Array[items];
}
pero no está logrando el resultado requerido, cualquier sugerencia o comentario es muy apreciado.
han utilizado como matriz de un nombre de referencia, mi nombreArray es different.Thanks para la sugerencia, está logrando mi resultado requerido. – Kalx