hasPropertyWithValue
Checks if a property exists and has a specific value.
Useful for conditional logic based on property values. Returns false if the property doesn't exist, is of the wrong type, or has a different value.
Example:
if (feature.hasPropertyWithValue("environment", "production")) {
enableStrictValidation()
}
if (feature.hasPropertyWithValue("version", 2)) {
useNewAlgorithm()
}Content copied to clipboard
Return
true if property exists and its value equals value, false otherwise
Parameters
name
the name of the property to check
value
the value to compare against
Type Parameters
T
the expected type of the property value