able to convert NSArray to js array