How to Delete Node from JSONValue?

Michael A. Puls II shadow2531 at
Thu Nov 7 13:43:01 UTC 2019

     import std.json;

     void main() {
         JSONValue j = ["a": "b", "x": "y"];
         //j["x"] = null;

What's the proper way to delete a node from a JSONValue object?

I was looking for something like remove("x") that you can do with 
an associative array, but std.json doesn't provide that. Setting 
the node to null or using destroy doesn't actually remove the 
node so that it's not serialized when using toJSON().

More information about the Digitalmars-d mailing list