Thank you. Looking at your concise solution and then at the definition of Fetch, I realise that, as usual, J will provide you with the right tool almost all the time. You just have to know all the tools.
On Fri, Sep 29, 2023 at 3:45 PM Henry Rich <henryhr...@gmail.com> wrote: > Something like > > (<1 0)&{::@> data > > untested. > > Henry Rich > > On 9/29/2023 9:39 AM, Pablo Landherr wrote: > > I have the following > > > > *data=: dec_json {some data source}* > > > > *$data* > > > > 48 > > > > *{.data* > > > > > ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ > > > > > │┌─────────┬──────┬────────────────┬─────────────────────┬─────────────────┬───────┬──────────────────┬──────────────────┬────────────┐│ > > > > ││seriesId │source│shortDescription│midDescription │longDescription > > │groupId│observationMaxDate│observationMinDate│seriesClosed││ > > > > > │├─────────┼──────┼────────────────┼─────────────────────┼─────────────────┼───────┼──────────────────┼──────────────────┼────────────┤│ > > > > ││SEKATSPMI│Nasdaq│ATS │ATS Austria, shilling│Austrian shilling│130 > > │2002-02-28 │1993-01-04 │json_true ││ > > > > > │└─────────┴──────┴────────────────┴─────────────────────┴─────────────────┴───────┴──────────────────┴──────────────────┴────────────┘│ > > > > > └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ > > > > *5{.seriesId=: >>0&{&.>1&{&.> data* > > > > SEKATSPMI > > > > SEKAUDPMI > > > > SEKBEFPMI > > > > SEKBRLPMI > > > > SEKCADPMI > > > > (Apologies if the boxes are wrapped and look confusing) > > > > > > I wonder if someone can suggest a more "elegant" expression than > >>> 0&{&.>1&{&.> from above? What I have works, but to me, it looks a bit > > ugly. > > > > > > Thank you, > > > > Pablo Landherr > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm