apoc.label.exists
Function APOC Core
apoc.label.exists(element, label) - returns true or false related to label existance
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 |