I have realm array and I want to filter objects that contain id = 2 and user_id = 4. Please review my code below.
for item in realm.objects(data.self).filter("id == 2 && user_id == 4") {
print(item)
}
You are using the wrong operator in a realm, please check my answer below.
for item in realm.objects(data.self).filter("id == 2 AND user_id == 4") {
print(item)
}
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments