草庐IT

Psychology

全部标签

swift - 如何在 Swift 中过滤对象数组?

您好,我有一个Book对象数组,我正在尝试返回所有由tags属性过滤的Books。例如varbooks=[(title="TheDaVinciCode",tags="Religion,Mystery,Europe"),(title="TheGirlWiththeDragonTatoo",tags="Psychology,Mystery,Thriller"),(title="Freakonomics",tags="Economics,non-fiction,Psychology")}]我想找到与标签Psychology相关的书籍,(title="TheGirlWiththeDragonT