Re: Foreach output into a multi dimensional associative array.

2020-10-28 Thread Vino via Digitalmars-d-learn
On Tuesday, 27 October 2020 at 08:00:55 UTC, Imperatorn wrote: On Monday, 26 October 2020 at 19:05:04 UTC, Vino wrote: [...] Some comments: 1. You're missing a comma (,) after the first item in your apidata 2. You're creating a string[int][string] instead of string[][string] (your expected

Re: Foreach output into a multi dimensional associative array.

2020-10-27 Thread Imperatorn via Digitalmars-d-learn
On Monday, 26 October 2020 at 19:05:04 UTC, Vino wrote: Hi All, Request your help on the below on how to store the output to a multi dimensional associative array. Code: import std.stdio: writeln; import asdf: parseJson; import std.conv: to; void main() { string[int][string] aa; string

Foreach output into a multi dimensional associative array.

2020-10-26 Thread Vino via Digitalmars-d-learn
Hi All, Request your help on the below on how to store the output to a multi dimensional associative array. Code: import std.stdio: writeln; import asdf: parseJson; import std.conv: to; void main() { string[int][string] aa; string apidata = `{"items": [ {"name":"T01","hostname":"te