我有一系列我感兴趣的键,如
fillable = ['name', 'lastname', 'address' ]
并且request
对象可以发送任意数量的参数
我想创建一个新的数据对象,它只包含fillable
array
有没有更好的方法来做到这一点,没有循环?在ES6左右
答案 0 :(得分:0)
一种选择是使用let paymentConfig = STPPaymentConfiguration.init();
paymentConfig.requiredBillingAddressFields = STPBillingAddressFields.none;
paymentConfig.publishableKey = "pk_test_whRD827lMXvFb1MtY9T7bRzW"
let theme = STPTheme.default();
let addCardViewController = STPAddCardViewController.init(configuration: paymentConfig, theme: theme);
addCardViewController.delegate = self;
let navigationController = UINavigationController(rootViewController: addCardViewController);
self.present(navigationController, animated: true, completion: nil);
func addCardViewController(_ addCardViewController: STPAddCardViewController, didCreateToken token: STPToken, completion: @escaping STPErrorBlock) {
print(token)
dismiss(animated: true)
}
echo 'a,b,c,"hello, hi",d' | csvtool col 4 -