Closed ThomasSmyth closed 6 years ago
you use `$"@attr"
all over the place - any chance you could just use .Q.id
on the api results and then use `attr
? Maybe with the level of nesting in the returned object that is infeasible
I think it's possibly just a dict, in which case something like:
q){.Q.id'[key x]!get x} (enlist`$"@attr")!enlist 123
attr| 123
Should work. Perhaps it would be useful to have a utility function like this, seeing as there are often things like this in API returned JSONs
q){$[99h=type x;.Q.id'[key x]!get x;.Q.id x]} (enlist`$"@attr")!enlist 123
attr| 123
q){$[99h=type x;.Q.id'[key x]!get x;.Q.id x]} enlist (enlist`$"@attr")!enlist 123
attr1
-----
123
Added purge function as qid
.
Nice qid function @vibronicshark55
Extensive updates to last fm code that serve to both simplify and expand functionality.