In the old days, you might have a function like this:
const char* find_response(const char* const id) const;
If the item could not be found
I think the second way is better. Or you can write like this:
int find_response(const std::string& id, std::string& value) const;
if this function return -1, it tells that you don't find the response.