相交 intersect

傳回兩個輸入清單中的通用值。 如果兩個清單之一為空,則會傳回空白清單。

類別

清單

函式語法

intersect(<parameters>)

參數

參數
類型
清單1
list
清單2
list

簽章與傳回的型別

intersect(listString,listString): listString
intersect(listDecimal,listDecimal): listDecimal
intersect(listInteger,listInteger): listInteger
intersect(listDateTime,listDateTime): listDateTime
intersect(listDateTimeOnly,listDateTimeOnly): listDateTimeOnly
intersect(listDateOnly,listDateOnly): listDateOnly
intersect(listDuration,listDuration): listDuration
intersect(listBoolean,listBoolean):listBoolean

傳回清單。

範例

intersect(
    ["sports", "news", "documentary"],
    ["sports", "movies", "documentary"]
)

傳回 ["sports", "news"]

intersect(
    #{ExperienceDataPlatform.profile.interests},
    ["sports", "news", "documentary"]
)

傳回設定檔屬性和指定類別清單之間的通用專案。

intersect(
    #{ExperienceDataPlatform.profile.interests},
        @event{myEvent.sport_interests}
)

傳回設定檔屬性和指定事件欄位之間的通用專案。

recommendation-more-help
b22c9c5d-9208-48f4-b874-1cefb8df4d76