web::json::value obj;
obj[JSONKeyRequest] = web::json::value::string(JSONValueRequest);
I create a JSON value, and insert some key and values to it. Then I get this obj in another function, trying to check that whether obj[JSONKeyRequest] equals to "abc", but it doesn't work:
web::json::value getObj = this->GetSendObj();
if (getObj[JSONKeyRequest] == web::json::value::string(L"abc"))
{
}
However, VC keeps shows:"Errors:No operators [] matches this operands , operand types are const web::json::value[std::wstring] So, how could I get the value based on the key and compare the value with a string ?