This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-10
Channels
- # ai (2)
- # beginners (3)
- # boot (113)
- # bristol-clojurians (2)
- # cider (77)
- # clara (43)
- # cljs-dev (48)
- # cljsrn (9)
- # clojure (319)
- # clojure-austin (2)
- # clojure-czech (4)
- # clojure-denmark (4)
- # clojure-france (4)
- # clojure-italy (4)
- # clojure-russia (2)
- # clojure-serbia (10)
- # clojure-spec (79)
- # clojure-uk (64)
- # clojurescript (109)
- # clr (3)
- # conf-proposals (21)
- # core-async (19)
- # cursive (26)
- # datascript (11)
- # datomic (19)
- # devcards (1)
- # emacs (25)
- # figwheel (9)
- # hoplon (31)
- # jobs (7)
- # jobs-discuss (14)
- # leiningen (10)
- # lumo (11)
- # off-topic (37)
- # om (40)
- # onyx (4)
- # perun (8)
- # planck (3)
- # rdf (4)
- # re-frame (40)
- # ring (11)
- # ring-swagger (2)
- # rum (21)
- # spacemacs (2)
- # specter (50)
- # untangled (93)
- # yada (13)
Hi! 2 questions. I'm using datascript to query arbitrarily complex JSON blobs (actually HAR archives like this: https://gist.github.com/LusciousPear/82f7b234ecbc6958b3c26b27539e839e), but I'm having trouble wrapping my head around nested entites:
1. How do I retrieve all {:response}
where {:response :status} == 200
?
2. How do I retireve all {:response}
where {:response :headers []}
contains 'Referer' ?
3. Do I need to describe a schema up front? that would be p. painful because the objects are quite complex
Looks like an easy schema though, should be pretty straight forward. Note, you don't have types (like str/int) in datascript...
datascript is not a good fit to query nested maps as they are. It can query flat collections though
Ahhh. Thanks! Out of curiosity, is there something datascript-like that's good at querying nasty JSON blobs? I've tried to wrap my head around spectre but that's just not happening.
spectre is the only one I know. Never worked with it though, only know it matches the keywords :)
I'm almost tempted to convert this to XML so I can use XPath. I know by doing that, I am excommunicated to some wretched, radioactive wasteland. 😉
Although intension claims to play nice with DataScript. https://github.com/alandipert/intension