output object only if has applicable key (directive)