apoc.label.exists
Function
apoc.label.exists(node Any, label String)
- returns true or false depending on whether or not the given label exists.
Usage Examples
The examples in this section are based on the following graph:
CREATE (s1:Student {name: 'Priya'});
MATCH (s1:Student {name: 'Priya'})
RETURN apoc.label.exists(s1, "Student") AS output;
output |
---|
TRUE |
MATCH (s1:Student {name: 'Priya'})
RETURN apoc.label.exists(s1, "Teacher") AS output;
output |
---|
FALSE |
Was this page helpful?