Re: Json output to container

2020-10-31 Thread Vino via Digitalmars-d-learn
On Friday, 30 October 2020 at 19:33:43 UTC, Paul Backus wrote: On Friday, 30 October 2020 at 19:07:20 UTC, Vino wrote: [...] Here's a working version of the code from your original post: import asdf : parseJson; import std.algorithm; import std.container.array; import std.stdio : writeln;

Re: Json output to container

2020-10-30 Thread Paul Backus via Digitalmars-d-learn
On Friday, 30 October 2020 at 19:07:20 UTC, Vino wrote: Requirement: parse the json string and store the output to a container. From, Vino.B Here's a working version of the code from your original post: import asdf : parseJson; import std.algorithm; import std.container.array; import

Re: Json output to container

2020-10-30 Thread Vino via Digitalmars-d-learn
On Friday, 30 October 2020 at 19:07:20 UTC, Vino wrote: On Friday, 30 October 2020 at 18:41:35 UTC, Paul Backus wrote: On Friday, 30 October 2020 at 10:23:22 UTC, Vino wrote: Hi, Request your help on the below code [...] .filter!(a => a.(["items"].byElement)) What exactly

Re: Json output to container

2020-10-30 Thread Vino via Digitalmars-d-learn
On Friday, 30 October 2020 at 18:41:35 UTC, Paul Backus wrote: On Friday, 30 October 2020 at 10:23:22 UTC, Vino wrote: Hi, Request your help on the below code [...] .filter!(a => a.(["items"].byElement)) What exactly are you trying to accomplish with this `a.(stuff)`

Re: Json output to container

2020-10-30 Thread Paul Backus via Digitalmars-d-learn
On Friday, 30 October 2020 at 10:23:22 UTC, Vino wrote: Hi, Request your help on the below code [...] .filter!(a => a.(["items"].byElement)) What exactly are you trying to accomplish with this `a.(stuff)` syntax? As I'm sure you've discovered, it is not valid D, but it

Re: Json output to container

2020-10-30 Thread Vino via Digitalmars-d-learn
On Friday, 30 October 2020 at 17:56:22 UTC, Andre Pany wrote: On Friday, 30 October 2020 at 10:23:22 UTC, Vino wrote: Hi, Request your help on the below code Code: import asdf: parseJson; import std.algorithm; import std.container.array; import std.stdio: writeln; import std.typecons:

Re: Json output to container

2020-10-30 Thread Andre Pany via Digitalmars-d-learn
On Friday, 30 October 2020 at 10:23:22 UTC, Vino wrote: Hi, Request your help on the below code Code: import asdf: parseJson; import std.algorithm; import std.container.array; import std.stdio: writeln; import std.typecons: Tuple, tuple; void main() { string apidata1 = `{"items": [

Json output to container

2020-10-30 Thread Vino via Digitalmars-d-learn
Hi, Request your help on the below code Code: import asdf: parseJson; import std.algorithm; import std.container.array; import std.stdio: writeln; import std.typecons: Tuple, tuple; void main() { string apidata1 = `{"items": [ {"name":"T01","hostname":"test01","pool":"Development"},