Access denied, Please sign in and make sure you have proper permission.
好吧,来个 python 版的:
any(x for x in production.option_types if '颜色' in x.get('presentation', '') )
@product.option_types.map(&:presentation).join['颜色']
scala,事实上现在很多语言都有借鉴 ruby 的
product.option_types.map(_.presentation).exists(_.contains("颜色"))
楼主这么查询,会有性能问题的,在内存中通过数组过滤,不是很推荐。直接在数据库中查找吧