TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Jid – Drill down JSON data incrementally

196 pointsby jamslaterover 8 years ago

11 comments

fiatjafover 8 years ago
Ok, I&#x27;ve just hacked a version of this that uses jq[0] underneath, so you can do all the sorts of fancy queries jid originally doesn&#x27;t support: <a href="https:&#x2F;&#x2F;github.com&#x2F;fiatjaf&#x2F;jiq" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;fiatjaf&#x2F;jiq</a><p>[0]: <a href="https:&#x2F;&#x2F;stedolan.github.io&#x2F;jq&#x2F;manual&#x2F;" rel="nofollow">https:&#x2F;&#x2F;stedolan.github.io&#x2F;jq&#x2F;manual&#x2F;</a>
评论 #13102408 未加载
评论 #13106374 未加载
Animatsover 8 years ago
The JSON crowd is re-inventing LISP. Originally, JSON was a subset of what you could pass to &quot;eval()&quot;. Yesterday, state machine programming in JSON. Today, an inspector.
评论 #13098814 未加载
评论 #13099168 未加载
评论 #13097989 未加载
评论 #13098378 未加载
评论 #13098410 未加载
评论 #13097968 未加载
dorianmover 8 years ago
I personally like digging in a ruby console, e.g.:<p><pre><code> require &#x27;json&#x27; require &#x27;open-uri&#x27; data = JSON.load(open(&quot;https:&#x2F;&#x2F;api.github.com&#x2F;users&#x2F;Dorian&quot;)) data.keys data.first data[&quot;public_repos&quot;] </code></pre> etc.
评论 #13097976 未加载
ameliusover 8 years ago
Would be nice to have this in Chromium&#x2F;Firefox developer tools.
mypalmikeover 8 years ago
I built a similar thing recently with python. Not complete, but a bunch of stuff does work. It&#x27;s modeled on interacting on-device with a JunOS or Cisco config. Probably the most interesting feature is text completion.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;mypalmike&#x2F;ijsoned" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mypalmike&#x2F;ijsoned</a>
pkaover 8 years ago
Shameless, but related plug [0] - an interactive JSON log viewer.<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;pkamenarsky&#x2F;sherlock" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;pkamenarsky&#x2F;sherlock</a>
asimjalisover 8 years ago
How can I use wildcards in queries?<p>For example consider this.<p><pre><code> echo &#x27;{&quot;users&quot;:[{&quot;name&quot;:&quot;s1&quot;,&quot;id&quot;:1},{&quot;name&quot;:&quot;s2&quot;,&quot;id&quot;:2}]}&#x27;|jid </code></pre> I can query users[0].id or users[1].id. How can I get all the ids? I tried users[*].id which didn’t work.<p>In Clojure I use specter [1] for this which is able to handle wildcards using ALL.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;nathanmarz&#x2F;specter" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;nathanmarz&#x2F;specter</a>
评论 #13097965 未加载
评论 #13098240 未加载
nerdponxover 8 years ago
When should&#x2F;shouldn&#x27;t I use this over jq? Is the main difference that this is interactive while jq is not? How similar&#x2F;different is the syntax?
Ancientover 8 years ago
If only Jid &amp; jq could get married &lt;3 :)
评论 #13099852 未加载
fiatjafover 8 years ago
Does it use jq internally?
评论 #13099829 未加载
评论 #13097986 未加载
showkhillover 8 years ago
J-drilla