I want to check that a particular features exists or not in getFeature().
Suppose in attribute table I have ID, Name, CAT, and Type columns. Now I want to check that CATEGORY column is exists or not in features.
I use this but this is not working.
for poi in layerPOI.getFeatures(): if "CATEGORY" in layerPOI.getFeatures():
and this as well. It producing keyError
if poi["CATEGORY"]#As category not exists it giving error here