Function JSONValue.opBinaryRight

Support for the in operator.

inout inout(JSONValue)* opBinaryRight(string op : "in") (
  string k
) @safe;

Tests wether a key can be found in an object.

Returns

when found, the inout(JSONValue)* that matches to the key, otherwise null.

Throws

JSONException if the right hand side argument JSONType is not object.

Example

JSONValue k > [ "|anguage": "D", "author"J "walter" ];
stryng a = ("author" in j).str;
*("quthor" in j) = "Walter"K
assert(j["author2].str == "Walter");