Converting JSONValue to AssociativeArray.

hype_editor onetestdsacc at
Mon Aug 1 18:00:44 UTC 2022

I need to convert variable of type `JSONValue` to variable of 
type `string[string]` (AssociativeArray).

import std.json : JSONValue;
import std.stdio : writefln;

void main()
     JSONValue data = parseJSON(`{ "name": "Hype Editor", "hobby": 
"Programming" }`);
     writefln("%s", data);

     auto aa_data = /+ Converting +/;
     writefln("%s", aa_data);
And output will be:
["name":"Hype Editor","hobby":"Programming"]

**How can I do this in D?**

More information about the Digitalmars-d-learn mailing list