-
Notifications
You must be signed in to change notification settings - Fork 115
Open
Description
Hey, I'm trying to filter objects that have one property, but don't have another. Is there a way to do that? Given this structure:
{
people: [
{
name: "Betty",
friend: { name: "Robert" }
},
{
name: "Victoria",
friend: {
name: "Chris", id: 1,
people: [
{
friend: {
name: "Jon"
}
}
]
}
},
]
}
I use this selector: object:has(.friend > .name) but I also want to include a condition - to get those friends that don't have an id, something like: object:has(.friend > .name):hasnot(.friend > .id) (to get objects that contain Robert and Jon, but not Chris)
Is this possible?
Metadata
Metadata
Assignees
Labels
No labels