Convert JS array to native array