## [doc on github.io](https://walkerever.github.io/)
# qic - Query In Console
![qic show](/docs/assets/images/qic.show.gif)
JSON/YAML/XML comand line query tool with interactive mode.
By design, it tries to keep simple. There're a lot compromises. It's not intending to embed a full syntax/sementic engine. For complicated situation, other than introducing very long single line expression, please try code blocks where you can use any python syntax.
This document is available with better format on github.io [QiC](https://laowangv5.github.io/qic/) where colorful text can be used for terminal output.
- [Installation](#installation)
- [Basics](#basics)
- [Check expanded code](#check-expanded-code)
- [Keys with special chars](#keys-with-special-chars)
- [Interactive mode](#interactive-mode)
- [Validate/Convert JSON/YAML/XML](#validate-and-convert-jsonxmlyaml)
- [Limit rows](#limit-rows)
- [Load extra modules](#load-extra-modules)
- [JSON/YAML/XML to HTML](#json-to-html)
----
-----
## Installation
`python -mpip install qic`
run it
`qic` or `python -mqic`
----
## Basics
by default it will validate, reformat and color the JSON stream.
"_" means the document root. This is the default value.
<pre>(py3) [me@mtp qic]$ cat test/s1.json | qic # _
[
{
<font color="#008700"><b>"_id"</b></font>: {
<font color="#008700"><b>"$oid"</b></font>: <font color="#AF0000">"5968dd23fc13ae04d9000001"</font>
},
<font color="#008700"><b>"product_name"</b></font>: <font color="#AF0000">"sildenafil citrate"</font>,
<font color="#008700"><b>"supplier"</b></font>: <font color="#AF0000">"Wisozk Inc"</font>,
<font color="#008700"><b>"quantity"</b></font>: <font color="#626262">261</font>,
<font color="#008700"><b>"unit_cost"</b></font>: <font color="#AF0000">"$10.47"</font>
},
{
<font color="#008700"><b>"_id"</b></font>: {
<font color="#008700"><b>"$oid"</b></font>: <font color="#AF0000">"5968dd23fc13ae04d9000002"</font>
},
<font color="#008700"><b>"product_name"</b></font>: <font color="#AF0000">"Mountain Juniperus ashei"</font>,
<font color="#008700"><b>"supplier"</b></font>: <font color="#AF0000">"Keebler-Hilpert"</font>,
<font color="#008700"><b>"quantity"</b></font>: <font color="#626262">292</font>,
<font color="#008700"><b>"unit_cost"</b></font>: <font color="#AF0000">"$8.74"</font>
},
{
<font color="#008700"><b>"_id"</b></font>: {
<font color="#008700"><b>"$oid"</b></font>: <font color="#AF0000">"5968dd23fc13ae04d9000003"</font>
},
<font color="#008700"><b>"product_name"</b></font>: <font color="#AF0000">"Dextromathorphan HBr"</font>,
<font color="#008700"><b>"supplier"</b></font>: <font color="#AF0000">"Schmitt-Weissnat"</font>,
<font color="#008700"><b>"quantity"</b></font>: <font color="#626262">211</font>,
<font color="#008700"><b>"unit_cost"</b></font>: <font color="#AF0000">"$20.53"</font>
}
]
</pre>
query its conent,
<pre>(py3) [me@mtp qic]$ cat test/s1.json | qic "_[0]"
{
<font color="#008700"><b>"_id"</b></font>: {
<font color="#008700"><b>"$oid"</b></font>: <font color="#AF0000">"5968dd23fc13ae04d9000001"</font>
},
<font color="#008700"><b>"product_name"</b></font>: <font color="#AF0000">"sildenafil citrate"</font>,
<font color="#008700"><b>"supplier"</b></font>: <font color="#AF0000">"Wisozk Inc"</font>,
<font color="#008700"><b>"quantity"</b></font>: <font color="#626262">261</font>,
<font color="#008700"><b>"unit_cost"</b></font>: <font color="#AF0000">"$10.47"</font>
}
(py3) [me@mtp qic]$
(py3) [me@mtp qic]$ cat test/s1.json | qic "_[0]._id"
{
<font color="#008700"><b>"$oid"</b></font>: <font color="#AF0000">"5968dd23fc13ae04d9000001"</font>
}
(py3) [me@mtp qic]$
(py3) [me@mtp qic]$ cat test/s1.json | qic "_[0].product_name"
sildenafil citrate
(py3) [me@mtp qic]$
(py3) [me@mtp qic]$ cat test/s1.json | qic "_[0].{product_name, quantity, unit_cost}"
{
<font color="#008700"><b>"product_name"</b></font>: <font color="#AF0000">"sildenafil citrate"</font>,
<font color="#008700"><b>"quantity"</b></font>: <font color="#626262">261</font>,
<font color="#008700"><b>"unit_cost"</b></font>: <font color="#AF0000">"$10.47"</font>
}
(py3) [me@mtp qic]$
(py3) [me@mtp qic]$ cat test/s1.json | qic "_[]._id"
[
{
<font color="#008700"><b>"$oid"</b></font>: <font color="#AF0000">"5968dd23fc13ae04d9000001"</font>
},
{
<font color="#008700"><b>"$oid"</b></font>: <font color="#AF0000">"5968dd23fc13ae04d9000002"</font>
},
{
<font color="#008700"><b>"$oid"</b></font>: <font color="#AF0000">"5968dd23fc13ae04d9000003"</font>
}
]
(py3) [me@mtp qic]$
(py3) [me@mtp qic]$ cat test/s1.json | qic "_[].{_id,quantity}"
[
{
<font color="#008700"><b>"_id"</b></font>: {
<font color="#008700"><b>"$oid"</b></font>: <font color="#AF0000">"5968dd23fc13ae04d9000001"</font>
},
<font color="#008700"><b>"quantity"</b></font>: <font color="#626262">261</font>
},
{
<font color="#008700"><b>"_id"</b></font>: {
<font color="#008700"><b>"$oid"</b></font>: <font color="#AF0000">"5968dd23fc13ae04d9000002"</font>
},
<font color="#008700"><b>"quantity"</b></font>: <font color="#626262">292</font>
},
{
<font color="#008700"><b>"_id"</b></font>: {
<font color="#008700"><b>"$oid"</b></font>: <font color="#AF0000">"5968dd23fc13ae04d9000003"</font>
},
<font color="#008700"><b>"quantity"</b></font>: <font color="#626262">211</font>
}
]
</pre>
----
## Check expanded code
<pre>(py3) [me@mtp qic]$ cat test/s1.json | qic "_[]._id" -X
<font color="#33C7DE"># run : </font>
[ _umy['_id'] for _umy in _ ]
[
{
<font color="#008700"><b>"$oid"</b></font>: <font color="#AF0000">"5968dd23fc13ae04d9000001"</font>
},
{
<font color="#008700"><b>"$oid"</b></font>: <font color="#AF0000">"5968dd23fc13ae04d9000002"</font>
},
{
<font color="#008700"><b>"$oid"</b></font>: <font color="#AF0000">"5968dd23fc13ae04d9000003"</font>
}
]
(py3) [me@mtp qic]$ cat test/s1.json | qic "[ _[0].product_name ]" -X
<font color="#33C7DE"># run : </font>
[ _[0]['product_name'] ]
[
<font color="#AF0000">"sildenafil citrate"</font>
]
(py3) [me@mtp qic]$
(py3) [me@mtp qic]$ cat test/s1.json | qic "_[].{_id,quantity}" -X
<font color="#33C7DE"># run : </font>
[ {'_id':_emt['_id'],'quantity':_emt['quantity']} for _emt in _ ]
[
{
<font color="#008700"><b>"_id"</b></font>: {
<font color="#008700"><b>"$oid"</b></font>: <font color="#AF0000">"5968dd23fc13ae04d9000001"</font>
},
<font color="#008700"><b>"quantity"</b></font>: <font color="#626262">261</font>
},
{
<font color="#008700"><b>"_id"</b></font>: {
<font color="#008700"><b>"$oid"</b></font>: <font color="#AF0000">"5968dd23fc13ae04d9000002"</font>
},
<font color="#008700"><b>"quantity"</b></font>: <font color="#626262">292</font>
},
{
<font color="#008700"><b>"_id"</b></font>: {
<font color="#008700"><b>"$oid"</b></font>: <font color="#AF0000">"5968dd23fc13ae04d9000003"</font>
},
<font color="#008700"><b>"quantity"</b></font>: <font color="#626262">211</font>
}
]
(py3) [me@mtp qic]$ cat test/s1.json | qic "_[0].{_id,quantity}" -X
<font color="#33C7DE"># run : </font>
{'_id':_[0]['_id'],'quantity':_[0]['quantity']}
{
<font color="#008700"><b>"_id"</b></font>: {
<font color="#008700"><b>"$oid"</b></font>: <font color="#AF0000">"5968dd23fc13ae04d9000001"</font>
},
<font color="#008700"><b>"quantity"</b></font>: <font color="#626262">261</font>
}
</pre>
-----
## Keys with special chars
look at below changed JSON, `product_name` is renamed to `product.name`. This will break the dot expansion QiC is using. In this situation, use `<>` to mark content within is a single unit.
<pre>(py3) [me@mtp qic]$ qic -f test/s1x.json
[
{
<font color="#008700"><b>"_id"</b></font>: {
<font color="#008700"><b>"$oid"</b></font>: <font color="#AF0000">"5968dd23fc13ae04d9000001"</font>
},
<font color="#008700"><b>"product.name"</b></font>: <font color="#AF0000">"sildenafil citrate"</font>,
<font color="#008700"><b>"supplier"</b></font>: <font color="#AF0000">"Wisozk Inc"</font>,
<font color="#008700"><b>"quantity"</b></font>: <font color="#626262">261</font>,
<font color="#008700"><b>"unit_cost"</b></font>: <font color="#AF0000">"$10.47"</font>
},
{
<font color="#008700"><b>"_id"</b></font>: {
<font color="#008700"><b>"$oid"</b></font>: <font color="#AF0000">"5968dd23fc13ae04d9000002"</font>
},
<font color="#008700"><b>"product.name"</b></font>: <font color="#AF0000">"Mountain Juniperus ashei"</font>,
<font color="#008700"><b>"supplier"</b></font>: <font color="#AF0000">"Keebler-Hilpert"</font>,
<font color="#008700"><b>"quantity"</b></font>: <font color="#626262">292</font>,
<font color="#008700"><b>"unit_cost"</b></font>: <font color="#AF0000">"$8.74"</font>
},
{
<font color="#008700"><b>"_id"</b></font>: {
<font color="#008700"><b>"$oid"</b></font>: <font color="#AF0000">"5968dd23fc13ae04d9000003"</font>
},
<font color="#008700"><b>"product.name"</b></font>: <font color="#AF0000">"Dextromathorphan HBr"</font>,
<font color="#008700"><b>"supplier"</b></font>: <font color="#AF0000">"Schmitt-Weissnat"</font>,
<font color="#008700"><b>"quantity"</b></font>: <font color="#626262">211</font>,
<font color="#008700"><b>"unit_cost"</b></font>: <font color="#AF0000">"$20.53"</font>
}
]
(py3) [me@mtp qic]$
(py3) [me@mtp qic]$ qic -f test/s1x.json "_[].product.name"
<font color="#E9AD0C"># expanded code :</font>
<font color="#E9AD0C">[ _kom['product']['name'] for _kom in _ ]</font>
<font color="#E9AD0C"># KeyError: 'product'</font>
(py3) [me@mtp qic]$
(py3) [me@mtp qic]$ qic -f test/s1x.json "_[].<product.name>"
[
<font color="#AF0000">"sildenafil citrate"</font>,
<font color="#AF0000">"Mountain Juniperus ashei"</font>,
<font color="#AF0000">"Dextromathorphan HBr"</font>
]
</pre>
-----
## Interactive Mode
`-I` enable interactive mode.
Qic will read user input from sys.stdin. so, for input stream, it could not be from unix pipe, instead use `-f` opiton.
when type `_` , a small menu is promptec all internal functions started with `_`.
Before prompted for user input, all keys in the JSON are stored for word completion prompt -- as you may have noticed, they're case insenstive.
<pre>(py3) [me@mtp qic]$ qic -f test/s6.json -I
[qic] $ _
<span style="background-color:#BCBCBC"><font color="#FFFFFF"> _ </font></span><span style="background-color:#444444"><font color="#FFFFFF"> </font></span>
<span style="background-color:#BCBCBC"><font color="#FFFFFF"> _fl </font></span><span style="background-color:#444444"><font color="#FFFFFF"> </font></span>
<span style="background-color:#BCBCBC"><font color="#FFFFFF"> _flatlist </font></span><span style="background-color:#444444"><font color="#FFFFFF"> </font></span>
<span style="background-color:#BCBCBC"><font color="#FFFFFF"> _j </font></span><span style="background-color:#444444"><font color="#FFFFFF"> </font></span>
<span style="background-color:#BCBCBC"><font color="#FFFFFF"> _l </font></span><span style="background-color:#A8A8A8"><font color="#FFFFFF"> </font></span>
<span style="background-color:#BCBCBC"><font color="#FFFFFF"> _l2pt </font></span><span style="background-color:#A8A8A8"><font color="#FFFFFF"> </font></span>
<span style="background-color:#BCBCBC"><font color="#FFFFFF"> _l2t </font></span><span style="background-color:#A8A8A8"><font color="#FFFFFF"> </font></span>
</pre>
<pre>[qic] $ _<font color="#626262">.</font>users[<font color="#626262">0</font>]<font color="#626262">.</font>f
<span style="background-color:#BCBCBC"><font color="#FFFFFF"> firstname </font></span><span style="background-color:#444444"><font color="#FFFFFF"> </font></span>
</pre>
<pre>[qic] $ _<font color="#626262">.</font>users[<font color="#626262">0</font>]<font color="#626262">.</font>firstname
Krish</pre>
_l2t is an internal function which print "standard" table. \
<pre>
[qic] $ _l2t(_<font color="#626262">.</font>users)
<b>userId firstName lastName phoneNumber emailAddress</b>
------------------------------------------------------------------------
1 Krish Lee 123456 krish.lee@learningcontainer.com
2 racks jacson 123456 racks.jacson@learningcontainer.com
3 denial roast 33333333 denial.roast@learningcontainer.com
4 devid neo 222222222 devid.neo@learningcontainer.com
5 jone mac 111111111 jone.mac@learningcontainer.com
</pre>
use `'''` to mark code block start and end.
<pre>[qic] $
[qic] $ <font color="#AF0000">'''</font>
[qic] $ guys <font color="#626262">=</font> <font color="#AF0000">""</font>
[qic] $ <font color="#008700"><b>for</b></font> i <font color="#AF00FF"><b>in</b></font> _<font color="#626262">.</font>users :
[qic] $ guys <font color="#626262">+=</font> i<font color="#626262">.</font>firstname <font color="#626262">+</font> i<font color="#626262">.</font>lastname <font color="#626262">+</font> <font color="#AF0000">", "</font>
[qic] $ <font color="#008700">print</font>(<font color="#AF0000">"List :"</font>, guys<font color="#626262">.</font>rstrip())
[qic] $
[qic] $ <font color="#AF0000">'''</font>
List : KrishLee, racksjacson, denialroast, devidneo, jonemac,
[qic] $
[qic] $
</pre>
use `\q` or `quit()` to leave Qic.
<pre>(py3) [me@mtp qic]$
(py3) [me@mtp qic]$ qic -f test/s6.json -I
[qic] $
[qic] $ \q
(py3) [me@mtp qic]$
(py3) [me@mtp qic]$ qic -f test/s6.json -I
[qic] $ quit()
(py3) [me@mtp qic]$
</pre>
## Validate and Convert JSON/XML/YAML
without any parameters, feed input into QiC and it will serve as a format validator ( plus foramatter, etc.).
`-t` specify source as JSON, YAML or XML. here all examples are from JSON format and `JSON` is the default type. Choose the right one if you're going to working with YAML or XML.
Internal function `_json` or `-j` will dump output as well formatted JSON and this is the default behaviour.
`_yaml` or `_y` will dump well formatted YAML, while `_xml` or `_x` will dump well formatted XML.
specify them in format of `_x($expr)`, if for full doc, say, `_x(_)`, just use `_x`.
<pre>(py3) [me@mtp qic]$ qic -f test/s6.json _x
<font color="#AF8700"><?xml version="1.0" ?></font>
<font color="#008700"><b><root></b></font>
<font color="#008700"><b><users</b></font> <font color="#878700">type=</font><font color="#AF0000">"list"</font><font color="#008700"><b>></b></font>
<font color="#008700"><b><item</b></font> <font color="#878700">type=</font><font color="#AF0000">"dict"</font><font color="#008700"><b>></b></font>
<font color="#008700"><b><userId</b></font> <font color="#878700">type=</font><font color="#AF0000">"int"</font><font color="#008700"><b>></b></font>1<font color="#008700"><b></userId></b></font>
<font color="#008700"><b><firstName</b></font> <font color="#878700">type=</font><font color="#AF0000">"str"</font><font color="#008700"><b>></b></font>Krish<font color="#008700"><b></firstName></b></font>
<font color="#008700"><b><lastName</b></font> <font color="#878700">type=</font><font color="#AF0000">"str"</font><font color="#008700"><b>></b></font>Lee<font color="#008700"><b></lastName></b></font>
<font color="#008700"><b><phoneNumber</b></font> <font color="#878700">type=</font><font color="#AF0000">"str"</font><font color="#008700"><b>></b></font>123456<font color="#008700"><b></phoneNumber></b></font>
<font color="#008700"><b><emailAddress</b></font> <font color="#878700">type=</font><font color="#AF0000">"str"</font><font color="#008700"><b>></b></font>krish.lee@learningcontainer.com<font color="#008700"><b></emailAddress></b></font>
<font color="#008700"><b></item></b></font>
<font color="#008700"><b><item</b></font> <font color="#878700">type=</font><font color="#AF0000">"dict"</font><font color="#008700"><b>></b></font>
<font color="#008700"><b><userId</b></font> <font color="#878700">type=</font><font color="#AF0000">"int"</font><font color="#008700"><b>></b></font>2<font color="#008700"><b></userId></b></font>
<font color="#008700"><b><firstName</b></font> <font color="#878700">type=</font><font color="#AF0000">"str"</font><font color="#008700"><b>></b></font>racks<font color="#008700"><b></firstName></b></font>
<font color="#008700"><b><lastName</b></font> <font color="#878700">type=</font><font color="#AF0000">"str"</font><font color="#008700"><b>></b></font>jacson<font color="#008700"><b></lastName></b></font>
<font color="#008700"><b><phoneNumber</b></font> <font color="#878700">type=</font><font color="#AF0000">"str"</font><font color="#008700"><b>></b></font>123456<font color="#008700"><b></phoneNumber></b></font>
<font color="#008700"><b><emailAddress</b></font> <font color="#878700">type=</font><font color="#AF0000">"str"</font><font color="#008700"><b>></b></font>racks.jacson@learningcontainer.com<font color="#008700"><b></emailAddress></b></font>
<font color="#008700"><b></item></b></font>
<font color="#008700"><b><item</b></font> <font color="#878700">type=</font><font color="#AF0000">"dict"</font><font color="#008700"><b>></b></font>
<font color="#008700"><b><userId</b></font> <font color="#878700">type=</font><font color="#AF0000">"int"</font><font color="#008700"><b>></b></font>3<font color="#008700"><b></userId></b></font>
<font color="#008700"><b><firstName</b></font> <font color="#878700">type=</font><font color="#AF0000">"str"</font><font color="#008700"><b>></b></font>denial<font color="#008700"><b></firstName></b></font>
<font color="#008700"><b><lastName</b></font> <font color="#878700">type=</font><font color="#AF0000">"str"</font><font color="#008700"><b>></b></font>roast<font color="#008700"><b></lastName></b></font>
<font color="#008700"><b><phoneNumber</b></font> <font color="#878700">type=</font><font color="#AF0000">"str"</font><font color="#008700"><b>></b></font>33333333<font color="#008700"><b></phoneNumber></b></font>
<font color="#008700"><b><emailAddress</b></font> <font color="#878700">type=</font><font color="#AF0000">"str"</font><font color="#008700"><b>></b></font>denial.roast@learningcontainer.com<font color="#008700"><b></emailAddress></b></font>
<font color="#008700"><b></item></b></font>
<font color="#008700"><b><item</b></font> <font color="#878700">type=</font><font color="#AF0000">"dict"</font><font color="#008700"><b>></b></font>
<font color="#008700"><b><userId</b></font> <font color="#878700">type=</font><font color="#AF0000">"int"</font><font color="#008700"><b>></b></font>4<font color="#008700"><b></userId></b></font>
<font color="#008700"><b><firstName</b></font> <font color="#878700">type=</font><font color="#AF0000">"str"</font><font color="#008700"><b>></b></font>devid<font color="#008700"><b></firstName></b></font>
<font color="#008700"><b><lastName</b></font> <font color="#878700">type=</font><font color="#AF0000">"str"</font><font color="#008700"><b>></b></font>neo<font color="#008700"><b></lastName></b></font>
<font color="#008700"><b><phoneNumber</b></font> <font color="#878700">type=</font><font color="#AF0000">"str"</font><font color="#008700"><b>></b></font>222222222<font color="#008700"><b></phoneNumber></b></font>
<font color="#008700"><b><emailAddress</b></font> <font color="#878700">type=</font><font color="#AF0000">"str"</font><font color="#008700"><b>></b></font>devid.neo@learningcontainer.com<font color="#008700"><b></emailAddress></b></font>
<font color="#008700"><b></item></b></font>
<font color="#008700"><b><item</b></font> <font color="#878700">type=</font><font color="#AF0000">"dict"</font><font color="#008700"><b>></b></font>
<font color="#008700"><b><userId</b></font> <font color="#878700">type=</font><font color="#AF0000">"int"</font><font color="#008700"><b>></b></font>5<font color="#008700"><b></userId></b></font>
<font color="#008700"><b><firstName</b></font> <font color="#878700">type=</font><font color="#AF0000">"str"</font><font color="#008700"><b>></b></font>jone<font color="#008700"><b></firstName></b></font>
<font color="#008700"><b><lastName</b></font> <font color="#878700">type=</font><font color="#AF0000">"str"</font><font color="#008700"><b>></b></font>mac<font color="#008700"><b></lastName></b></font>
<font color="#008700"><b><phoneNumber</b></font> <font color="#878700">type=</font><font color="#AF0000">"str"</font><font color="#008700"><b>></b></font>111111111<font color="#008700"><b></phoneNumber></b></font>
<font color="#008700"><b><emailAddress</b></font> <font color="#878700">type=</font><font color="#AF0000">"str"</font><font color="#008700"><b>></b></font>jone.mac@learningcontainer.com<font color="#008700"><b></emailAddress></b></font>
<font color="#008700"><b></item></b></font>
<font color="#008700"><b></users></b></font>
<font color="#008700"><b></root></b></font>
(py3) [me@mtp qic]$
(py3) [me@mtp qic]$ qic -f test/s6.json _y
<font color="#0000FF"><b>---</b></font>
<font color="#008700"><b>users</b></font>:
- <font color="#008700"><b>emailAddress</b></font>: krish.lee@learningcontainer.com
<font color="#008700"><b>firstName</b></font>: Krish
<font color="#008700"><b>lastName</b></font>: Lee
<font color="#008700"><b>phoneNumber</b></font>: <font color="#AF0000">'123456'</font>
<font color="#008700"><b>userId</b></font>: 1
- <font color="#008700"><b>emailAddress</b></font>: racks.jacson@learningcontainer.com
<font color="#008700"><b>firstName</b></font>: racks
<font color="#008700"><b>lastName</b></font>: jacson
<font color="#008700"><b>phoneNumber</b></font>: <font color="#AF0000">'123456'</font>
<font color="#008700"><b>userId</b></font>: 2
- <font color="#008700"><b>emailAddress</b></font>: denial.roast@learningcontainer.com
<font color="#008700"><b>firstName</b></font>: denial
<font color="#008700"><b>lastName</b></font>: roast
<font color="#008700"><b>phoneNumber</b></font>: <font color="#AF0000">'33333333'</font>
<font color="#008700"><b>userId</b></font>: 3
- <font color="#008700"><b>emailAddress</b></font>: devid.neo@learningcontainer.com
<font color="#008700"><b>firstName</b></font>: devid
<font color="#008700"><b>lastName</b></font>: neo
<font color="#008700"><b>phoneNumber</b></font>: <font color="#AF0000">'222222222'</font>
<font color="#008700"><b>userId</b></font>: 4
- <font color="#008700"><b>emailAddress</b></font>: jone.mac@learningcontainer.com
<font color="#008700"><b>firstName</b></font>: jone
<font color="#008700"><b>lastName</b></font>: mac
<font color="#008700"><b>phoneNumber</b></font>: <font color="#AF0000">'111111111'</font>
<font color="#008700"><b>userId</b></font>: 5
(py3) [me@mtp qic]$
(py3) [me@mtp qic]$ qic -f test/s6.json '_y(_)'
<font color="#0000FF"><b>---</b></font>
<font color="#008700"><b>users</b></font>:
- <font color="#008700"><b>emailAddress</b></font>: krish.lee@learningcontainer.com
<font color="#008700"><b>firstName</b></font>: Krish
<font color="#008700"><b>lastName</b></font>: Lee
<font color="#008700"><b>phoneNumber</b></font>: <font color="#AF0000">'123456'</font>
<font color="#008700"><b>userId</b></font>: 1
- <font color="#008700"><b>emailAddress</b></font>: racks.jacson@learningcontainer.com
<font color="#008700"><b>firstName</b></font>: racks
<font color="#008700"><b>lastName</b></font>: jacson
<font color="#008700"><b>phoneNumber</b></font>: <font color="#AF0000">'123456'</font>
<font color="#008700"><b>userId</b></font>: 2
- <font color="#008700"><b>emailAddress</b></font>: denial.roast@learningcontainer.com
<font color="#008700"><b>firstName</b></font>: denial
<font color="#008700"><b>lastName</b></font>: roast
<font color="#008700"><b>phoneNumber</b></font>: <font color="#AF0000">'33333333'</font>
<font color="#008700"><b>userId</b></font>: 3
- <font color="#008700"><b>emailAddress</b></font>: devid.neo@learningcontainer.com
<font color="#008700"><b>firstName</b></font>: devid
<font color="#008700"><b>lastName</b></font>: neo
<font color="#008700"><b>phoneNumber</b></font>: <font color="#AF0000">'222222222'</font>
<font color="#008700"><b>userId</b></font>: 4
- <font color="#008700"><b>emailAddress</b></font>: jone.mac@learningcontainer.com
<font color="#008700"><b>firstName</b></font>: jone
<font color="#008700"><b>lastName</b></font>: mac
<font color="#008700"><b>phoneNumber</b></font>: <font color="#AF0000">'111111111'</font>
<font color="#008700"><b>userId</b></font>: 5
(py3) [me@mtp qic]$
(py3) [me@mtp qic]$ qic -f test/s6.json '_y(_.users[:2])'
<font color="#0000FF"><b>---</b></font>
- <font color="#008700"><b>emailAddress</b></font>: krish.lee@learningcontainer.com
<font color="#008700"><b>firstName</b></font>: Krish
<font color="#008700"><b>lastName</b></font>: Lee
<font color="#008700"><b>phoneNumber</b></font>: <font color="#AF0000">'123456'</font>
<font color="#008700"><b>userId</b></font>: 1
- <font color="#008700"><b>emailAddress</b></font>: racks.jacson@learningcontainer.com
<font color="#008700"><b>firstName</b></font>: racks
<font color="#008700"><b>lastName</b></font>: jacson
<font color="#008700"><b>phoneNumber</b></font>: <font color="#AF0000">'123456'</font>
<font color="#008700"><b>userId</b></font>: 2
(py3) [me@mtp qic]$ </pre>
## Limit rows
when the embeded list is huge, we may only want to see a few of them.
slice `[:$n]` can be used for specified list, but `-l $n` apply to all lists included.
<pre>(py3) [me@mtp qic]$ qic -f test/s6.json '_.users' | qic _y
<font color="#0000FF"><b>---</b></font>
- <font color="#008700"><b>emailAddress</b></font>: krish.lee@learningcontainer.com
<font color="#008700"><b>firstName</b></font>: Krish
<font color="#008700"><b>lastName</b></font>: Lee
<font color="#008700"><b>phoneNumber</b></font>: <font color="#AF0000">'123456'</font>
<font color="#008700"><b>userId</b></font>: 1
- <font color="#008700"><b>emailAddress</b></font>: racks.jacson@learningcontainer.com
<font color="#008700"><b>firstName</b></font>: racks
<font color="#008700"><b>lastName</b></font>: jacson
<font color="#008700"><b>phoneNumber</b></font>: <font color="#AF0000">'123456'</font>
<font color="#008700"><b>userId</b></font>: 2
- <font color="#008700"><b>emailAddress</b></font>: denial.roast@learningcontainer.com
<font color="#008700"><b>firstName</b></font>: denial
<font color="#008700"><b>lastName</b></font>: roast
<font color="#008700"><b>phoneNumber</b></font>: <font color="#AF0000">'33333333'</font>
<font color="#008700"><b>userId</b></font>: 3
- <font color="#008700"><b>emailAddress</b></font>: devid.neo@learningcontainer.com
<font color="#008700"><b>firstName</b></font>: devid
<font color="#008700"><b>lastName</b></font>: neo
<font color="#008700"><b>phoneNumber</b></font>: <font color="#AF0000">'222222222'</font>
<font color="#008700"><b>userId</b></font>: 4
- <font color="#008700"><b>emailAddress</b></font>: jone.mac@learningcontainer.com
<font color="#008700"><b>firstName</b></font>: jone
<font color="#008700"><b>lastName</b></font>: mac
<font color="#008700"><b>phoneNumber</b></font>: <font color="#AF0000">'111111111'</font>
<font color="#008700"><b>userId</b></font>: 5
(py3) [me@mtp qic]$ qic -f test/s6.json -l2 '_.users' | qic _y
<font color="#33C7DE"># _[] 5 -> 2</font>
<font color="#0000FF"><b>---</b></font>
- <font color="#008700"><b>emailAddress</b></font>: krish.lee@learningcontainer.com
<font color="#008700"><b>firstName</b></font>: Krish
<font color="#008700"><b>lastName</b></font>: Lee
<font color="#008700"><b>phoneNumber</b></font>: <font color="#AF0000">'123456'</font>
<font color="#008700"><b>userId</b></font>: 1
- <font color="#008700"><b>emailAddress</b></font>: racks.jacson@learningcontainer.com
<font color="#008700"><b>firstName</b></font>: racks
<font color="#008700"><b>lastName</b></font>: jacson
<font color="#008700"><b>phoneNumber</b></font>: <font color="#AF0000">'123456'</font>
<font color="#008700"><b>userId</b></font>: 2
(py3) [me@mtp qic]$ qic -f test/s6.json -l2 '_.users[:2]'
[
{
<font color="#008700"><b>"userId"</b></font>: <font color="#626262">1</font>,
<font color="#008700"><b>"firstName"</b></font>: <font color="#AF0000">"Krish"</font>,
<font color="#008700"><b>"lastName"</b></font>: <font color="#AF0000">"Lee"</font>,
<font color="#008700"><b>"phoneNumber"</b></font>: <font color="#AF0000">"123456"</font>,
<font color="#008700"><b>"emailAddress"</b></font>: <font color="#AF0000">"krish.lee@learningcontainer.com"</font>
},
{
<font color="#008700"><b>"userId"</b></font>: <font color="#626262">2</font>,
<font color="#008700"><b>"firstName"</b></font>: <font color="#AF0000">"racks"</font>,
<font color="#008700"><b>"lastName"</b></font>: <font color="#AF0000">"jacson"</font>,
<font color="#008700"><b>"phoneNumber"</b></font>: <font color="#AF0000">"123456"</font>,
<font color="#008700"><b>"emailAddress"</b></font>: <font color="#AF0000">"racks.jacson@learningcontainer.com"</font>
}
]
</pre>
## load extra modules
load module/class/function from python source files.
<pre><font color="#00AFFF">yonghang</font>@<font color="#FF8700">mtp</font><font color="#00AFFF">~</font> $ cat ~/tmp/tm.py
def xxlen(ds) :
return str(len(ds)) + " : " + str(ds)
<font color="#00AFFF">yonghang</font>@<font color="#FF8700">mtp</font><font color="#00AFFF">~</font> $ curl -s walkerever.com/share/test/json/s6.json | qic -m ~/tmp/tm.py "tm.xxlen(_)"
1 : {'users': [{'userId': 1, 'firstName': 'Krish', 'lastName': 'Lee', 'phoneNumber': '123456', 'emailAddress': 'krish.lee@learningcontainer.com'}, {'userId': 2, 'firstName': 'racks', 'lastName': 'jacson', 'phoneNumber': '123456', 'emailAddress': 'racks.jacson@learningcontainer.com'}, {'userId': 3, 'firstName': 'denial', 'lastName': 'roast', 'phoneNumber': '33333333', 'emailAddress': 'denial.roast@learningcontainer.com'}, {'userId': 4, 'firstName': 'devid', 'lastName': 'neo', 'phoneNumber': '222222222', 'emailAddress': 'devid.neo@learningcontainer.com'}, {'userId': 5, 'firstName': 'jone', 'lastName': 'mac', 'phoneNumber': '111111111', 'emailAddress': 'jone.mac@learningcontainer.com'}]}
</pre>
you can load more,
<pre><font color="#00AFFF">yonghang</font>@<font color="#FF8700">mtp</font><font color="#00AFFF">~</font> $ curl -s walkerever.com/share/test/json/s6.json | qic -m ~/tmp/tm.py,json,yaml "tm.xxlen(_)"
1 : {'users': [{'userId': 1, 'firstName': 'Krish', 'lastName': 'Lee', 'phoneNumber': '123456', 'emailAddress': 'krish.lee@learningcontainer.com'}, {'userId': 2, 'firstName': 'racks', 'lastName': 'jacson', 'phoneNumber': '123456', 'emailAddress': 'racks.jacson@learningcontainer.com'}, {'userId': 3, 'firstName': 'denial', 'lastName': 'roast', 'phoneNumber': '33333333', 'emailAddress': 'denial.roast@learningcontainer.com'}, {'userId': 4, 'firstName': 'devid', 'lastName': 'neo', 'phoneNumber': '222222222', 'emailAddress': 'devid.neo@learningcontainer.com'}, {'userId': 5, 'firstName': 'jone', 'lastName': 'mac', 'phoneNumber': '111111111', 'emailAddress': 'jone.mac@learningcontainer.com'}]}
</pre>
## JSON to HTML
_h and _zh are two functions for the convertion. _h is to create plain HTML table while _zh makes collapse/expand possible.
<pre><font color="#00AFFF">yonghang</font>@<font color="#FF8700">mtp</font><font color="#00AFFF">~</font> $ curl -s walkerever.com/share/test/json/s6.json | qic "_h"
<<font color="#008700"><b>tt</b></font>>
<<font color="#008700"><b>table</b></font> <font color="#878700">style</font><font color="#626262">=</font><font color="#AF0000">"border-collapse:collapse;;"</font> <font color="#878700">border</font><font color="#626262">=</font><font color="#AF0000">1</font> >
<<font color="#008700"><b>tr</b></font> <font color="#878700">class</font><font color="#626262">=</font><font color="#AF0000">"child-MPzoqOdFrYXQpqJzvSpl"</font>>
<<font color="#008700"><b>td</b></font> <font color="#878700">valign</font><font color="#626262">=</font><font color="#AF0000">"top"</font>><<font color="#008700"><b>b</b></font>>users</<font color="#008700"><b>b</b></font>></<font color="#008700"><b>td</b></font>>
<<font color="#008700"><b>td</b></font>>
<<font color="#008700"><b>table</b></font> <font color="#878700">style</font><font color="#626262">=</font><font color="#AF0000">"border-collapse:collapse;;"</font> <font color="#878700">border</font><font color="#626262">=</font><font color="#AF0000">1</font> <font color="#878700">width</font><font color="#626262">=</font><font color="#AF0000">"100%"</font>>
<<font color="#008700"><b>tr</b></font> <font color="#878700">class</font><font color="#626262">=</font><font color="#AF0000">"child-WvkznPHasGyCxViXFeQH"</font> <font color="#878700">style</font><font color="#626262">=</font><font color="#AF0000">"background-color:#FFFFFF"</font>>
<<font color="#008700"><b>td</b></font> <font color="#878700">valign</font><font color="#626262">=</font><font color="#AF0000">"top"</font>><<font color="#008700"><b>b</b></font>>userId</<font color="#008700"><b>b</b></font>></<font color="#008700"><b>td</b></font>>
<<font color="#008700"><b>td</b></font>>1</<font color="#008700"><b>td</b></font>>
</<font color="#008700"><b>tr</b></font>>
<<font color="#008700"><b>tr</b></font> <font color="#878700">class</font><font color="#626262">=</font><font color="#AF0000">"child-WvkznPHasGyCxViXFeQH"</font> <font color="#878700">style</font><font color="#626262">=</font><font color="#AF0000">"background-color:#FFFFFF"</font>>
<<font color="#008700"><b>td</b></font> <font color="#878700">valign</font><font color="#626262">=</font><font color="#AF0000">"top"</font>><<font color="#008700"><b>b</b></font>>firstName</<font color="#008700"><b>b</b></font>></<font color="#008700"><b>td</b></font>>
<<font color="#008700"><b>td</b></font>>Krish</<font color="#008700"><b>td</b></font>>
</<font color="#008700"><b>tr</b></font>>
<<font color="#008700"><b>tr</b></font> <font color="#878700">class</font><font color="#626262">=</font><font color="#AF0000">"child-WvkznPHasGyCxViXFeQH"</font> <font color="#878700">style</font><font color="#626262">=</font><font color="#AF0000">"background-color:#FFFFFF"</font>>
<<font color="#008700"><b>td</b></font> <font color="#878700">valign</font><font color="#626262">=</font><font color="#AF0000">"top"</font>><<font color="#008700"><b>b</b></font>>lastName</<font color="#008700"><b>b</b></font>></<font color="#008700"><b>td</b></font>>
<<font color="#008700"><b>td</b></font>>Lee</<font color="#008700"><b>td</b></font>>
</<font color="#008700"><b>tr</b></font>>
<<font color="#008700"><b>tr</b></font> <font color="#878700">class</font><font color="#626262">=</font><font color="#AF0000">"child-WvkznPHasGyCxViXFeQH"</font> <font color="#878700">style</font><font color="#626262">=</font><font color="#AF0000">"background-color:#FFFFFF"</font>>
<<font color="#008700"><b>td</b></font> <font color="#878700">valign</font><font color="#626262">=</font><font color="#AF0000">"top"</font>><<font color="#008700"><b>b</b></font>>phoneNumber</<font color="#008700"><b>b</b></font>></<font color="#008700"><b>td</b></font>>
<<font color="#008700"><b>td</b></font>>123456</<font color="#008700"><b>td</b></font>>
</<font color="#008700"><b>tr</b></font>>
<<font color="#008700"><b>tr</b></font> <font color="#878700">class</font><font color="#626262">=</font><font color="#AF0000">"child-WvkznPHasGyCxViXFeQH"</font> <font color="#878700">style</font><font color="#626262">=</font><font color="#AF0000">"background-color:#FFFFFF"</font>>
<<font color="#008700"><b>td</b></font> <font color="#878700">valign</font><font color="#626262">=</font><font color="#AF0000">"top"</font>><<font color="#008700"><b>b</b></font>>emailAddress</<font color="#008700"><b>b</b></font>></<font color="#008700"><b>td</b></font>>
<<font color="#008700"><b>td</b></font>>krish.lee@learningcontainer.com</<font color="#008700"><b>td</b></font>>
</<font color="#008700"><b>tr</b></font>>
<<font color="#008700"><b>tr</b></font> <font color="#878700">class</font><font color="#626262">=</font><font color="#AF0000">"child-WvkznPHasGyCxViXFeQH"</font> <font color="#878700">style</font><font color="#626262">=</font><font color="#AF0000">"background-color:#F1F1F1"</font>>
<<font color="#008700"><b>td</b></font> <font color="#878700">valign</font><font color="#626262">=</font><font color="#AF0000">"top"</font>><<font color="#008700"><b>b</b></font>>userId</<font color="#008700"><b>b</b></font>></<font color="#008700"><b>td</b></font>>
<<font color="#008700"><b>td</b></font>>2</<font color="#008700"><b>td</b></font>>
</<font color="#008700"><b>tr</b></font>>
<<font color="#008700"><b>tr</b></font> <font color="#878700">class</font><font color="#626262">=</font><font color="#AF0000">"child-WvkznPHasGyCxViXFeQH"</font> <font color="#878700">style</font><font color="#626262">=</font><font color="#AF0000">"background-color:#F1F1F1"</font>>
<<font color="#008700"><b>td</b></font> <font color="#878700">valign</font><font color="#626262">=</font><font color="#AF0000">"top"</font>><<font color="#008700"><b>b</b></font>>firstName</<font color="#008700"><b>b</b></font>></<font color="#008700"><b>td</b></font>>
<<font color="#008700"><b>td</b></font>>racks</<font color="#008700"><b>td</b></font>>
</<font color="#008700"><b>tr</b></font>>
<<font color="#008700"><b>tr</b></font> <font color="#878700">class</font><font color="#626262">=</font><font color="#AF0000">"child-WvkznPHasGyCxViXFeQH"</font> <font color="#878700">style</font><font color="#626262">=</font><font color="#AF0000">"background-color:#F1F1F1"</font>>
<<font color="#008700"><b>td</b></font> <font color="#878700">valign</font><font color="#626262">=</font><font color="#AF0000">"top"</font>><<font color="#008700"><b>b</b></font>>lastName</<font color="#008700"><b>b</b></font>></<font color="#008700"><b>td</b></font>>
<<font color="#008700"><b>td</b></font>>jacson</<font color="#008700"><b>td</b></font>>
</<font color="#008700"><b>tr</b></font>>
<<font color="#008700"><b>tr</b></font> <font color="#878700">class</font><font color="#626262">=</font><font color="#AF0000">"child-WvkznPHasGyCxViXFeQH"</font> <font color="#878700">style</font><font color="#626262">=</font><font color="#AF0000">"background-color:#F1F1F1"</font>>
<<font color="#008700"><b>td</b></font> <font color="#878700">valign</font><font color="#626262">=</font><font color="#AF0000">"top"</font>><<font color="#008700"><b>b</b></font>>phoneNumber</<font color="#008700"><b>b</b></font>></<font color="#008700"><b>td</b></font>>
<<font color="#008700"><b>td</b></font>>123456</<font color="#008700"><b>td</b></font>>
</<font color="#008700"><b>tr</b></font>>
<<font color="#008700"><b>tr</b></font> <font color="#878700">class</font><font color="#626262">=</font><font color="#AF0000">"child-WvkznPHasGyCxViXFeQH"</font> <font color="#878700">style</font><font color="#626262">=</font><font color="#AF0000">"background-color:#F1F1F1"</font>>
<<font color="#008700"><b>td</b></font> <font color="#878700">valign</font><font color="#626262">=</font><font color="#AF0000">"top"</font>><<font color="#008700"><b>b</b></font>>emailAddress</<font color="#008700"><b>b</b></font>></<font color="#008700"><b>td</b></font>>
<<font color="#008700"><b>td</b></font>>racks.jacson@learningcontainer.com</<font color="#008700"><b>td</b></font>>
</<font color="#008700"><b>tr</b></font>>
<<font color="#008700"><b>tr</b></font> <font color="#878700">class</font><font color="#626262">=</font><font color="#AF0000">"child-WvkznPHasGyCxViXFeQH"</font> <font color="#878700">style</font><font color="#626262">=</font><font color="#AF0000">"background-color:#FFFFFF"</font>>
<<font color="#008700"><b>td</b></font> <font color="#878700">valign</font><font color="#626262">=</font><font color="#AF0000">"top"</font>><<font color="#008700"><b>b</b></font>>userId</<font color="#008700"><b>b</b></font>></<font color="#008700"><b>td</b></font>>
<<font color="#008700"><b>td</b></font>>3</<font color="#008700"><b>td</b></font>>
</<font color="#008700"><b>tr</b></font>>
<<font color="#008700"><b>tr</b></font> <font color="#878700">class</font><font color="#626262">=</font><font color="#AF0000">"child-WvkznPHasGyCxViXFeQH"</font> <font color="#878700">style</font><font color="#626262">=</font><font color="#AF0000">"background-color:#FFFFFF"</font>>
<<font color="#008700"><b>td</b></font> <font color="#878700">valign</font><font color="#626262">=</font><font color="#AF0000">"top"</font>><<font color="#008700"><b>b</b></font>>firstName</<font color="#008700"><b>b</b></font>></<font color="#008700"><b>td</b></font>>
<<font color="#008700"><b>td</b></font>>denial</<font color="#008700"><b>td</b></font>>
</<font color="#008700"><b>tr</b></font>>
<<font color="#008700"><b>tr</b></font> <font color="#878700">class</font><font color="#626262">=</font><font color="#AF0000">"child-WvkznPHasGyCxViXFeQH"</font> <font color="#878700">style</font><font color="#626262">=</font><font color="#AF0000">"background-color:#FFFFFF"</font>>
<<font color="#008700"><b>td</b></font> <font color="#878700">valign</font><font color="#626262">=</font><font color="#AF0000">"top"</font>><<font color="#008700"><b>b</b></font>>lastName</<font color="#008700"><b>b</b></font>></<font color="#008700"><b>td</b></font>>
<<font color="#008700"><b>td</b></font>>roast</<font color="#008700"><b>td</b></font>>
</<font color="#008700"><b>tr</b></font>>
<<font color="#008700"><b>tr</b></font> <font color="#878700">class</font><font color="#626262">=</font><font color="#AF0000">"child-WvkznPHasGyCxViXFeQH"</font> <font color="#878700">style</font><font color="#626262">=</font><font color="#AF0000">"background-color:#FFFFFF"</font>>
<<font color="#008700"><b>td</b></font> <font color="#878700">valign</font><font color="#626262">=</font><font color="#AF0000">"top"</font>><<font color="#008700"><b>b</b></font>>phoneNumber</<font color="#008700"><b>b</b></font>></<font color="#008700"><b>td</b></font>>
<<font color="#008700"><b>td</b></font>>33333333</<font color="#008700"><b>td</b></font>>
</<font color="#008700"><b>tr</b></font>>
<<font color="#008700"><b>tr</b></font> <font color="#878700">class</font><font color="#626262">=</font><font color="#AF0000">"child-WvkznPHasGyCxViXFeQH"</font> <font color="#878700">style</font><font color="#626262">=</font><font color="#AF0000">"background-color:#FFFFFF"</font>>
<<font color="#008700"><b>td</b></font> <font color="#878700">valign</font><font color="#626262">=</font><font color="#AF0000">"top"</font>><<font color="#008700"><b>b</b></font>>emailAddress</<font color="#008700"><b>b</b></font>></<font color="#008700"><b>td</b></font>>
<<font color="#008700"><b>td</b></font>>denial.roast@learningcontainer.com</<font color="#008700"><b>td</b></font>>
</<font color="#008700"><b>tr</b></font>>
<<font color="#008700"><b>tr</b></font> <font color="#878700">class</font><font color="#626262">=</font><font color="#AF0000">"child-WvkznPHasGyCxViXFeQH"</font> <font color="#878700">style</font><font color="#626262">=</font><font color="#AF0000">"background-color:#F1F1F1"</font>>
<<font color="#008700"><b>td</b></font> <font color="#878700">valign</font><font color="#626262">=</font><font color="#AF0000">"top"</font>><<font color="#008700"><b>b</b></font>>userId</<font color="#008700"><b>b</b></font>></<font color="#008700"><b>td</b></font>>
<<font color="#008700"><b>td</b></font>>4</<font color="#008700"><b>td</b></font>>
</<font color="#008700"><b>tr</b></font>>
<<font color="#008700"><b>tr</b></font> <font color="#878700">class</font><font color="#626262">=</font><font color="#AF0000">"child-WvkznPHasGyCxViXFeQH"</font> <font color="#878700">style</font><font color="#626262">=</font><font color="#AF0000">"background-color:#F1F1F1"</font>>
<<font color="#008700"><b>td</b></font> <font color="#878700">valign</font><font color="#626262">=</font><font color="#AF0000">"top"</font>><<font color="#008700"><b>b</b></font>>firstName</<font color="#008700"><b>b</b></font>></<font color="#008700"><b>td</b></font>>
<<font color="#008700"><b>td</b></font>>devid</<font color="#008700"><b>td</b></font>>
</<font color="#008700"><b>tr</b></font>>
<<font color="#008700"><b>tr</b></font> <font color="#878700">class</font><font color="#626262">=</font><font color="#AF0000">"child-WvkznPHasGyCxViXFeQH"</font> <font color="#878700">style</font><font color="#626262">=</font><font color="#AF0000">"background-color:#F1F1F1"</font>>
<<font color="#008700"><b>td</b></font> <font color="#878700">valign</font><font color="#626262">=</font><font color="#AF0000">"top"</font>><<font color="#008700"><b>b</b></font>>lastName</<font color="#008700"><b>b</b></font>></<font color="#008700"><b>td</b></font>>
<<font color="#008700"><b>td</b></font>>neo</<font color="#008700"><b>td</b></font>>
</<font color="#008700"><b>tr</b></font>>
<<font color="#008700"><b>tr</b></font> <font color="#878700">class</font><font color="#626262">=</font><font color="#AF0000">"child-WvkznPHasGyCxViXFeQH"</font> <font color="#878700">style</font><font color="#626262">=</font><font color="#AF0000">"background-color:#F1F1F1"</font>>
<<font color="#008700"><b>td</b></font> <font color="#878700">valign</font><font color="#626262">=</font><font color="#AF0000">"top"</font>><<font color="#008700"><b>b</b></font>>phoneNumber</<font color="#008700"><b>b</b></font>></<font color="#008700"><b>td</b></font>>
<<font color="#008700"><b>td</b></font>>222222222</<font color="#008700"><b>td</b></font>>
</<font color="#008700"><b>tr</b></font>>
<<font color="#008700"><b>tr</b></font> <font color="#878700">class</font><font color="#626262">=</font><font color="#AF0000">"child-WvkznPHasGyCxViXFeQH"</font> <font color="#878700">style</font><font color="#626262">=</font><font color="#AF0000">"background-color:#F1F1F1"</font>>
<<font color="#008700"><b>td</b></font> <font color="#878700">valign</font><font color="#626262">=</font><font color="#AF0000">"top"</font>><<font color="#008700"><b>b</b></font>>emailAddress</<font color="#008700"><b>b</b></font>></<font color="#008700"><b>td</b></font>>
<<font color="#008700"><b>td</b></font>>devid.neo@learningcontainer.com</<font color="#008700"><b>td</b></font>>
</<font color="#008700"><b>tr</b></font>>
<<font color="#008700"><b>tr</b></font> <font color="#878700">class</font><font color="#626262">=</font><font color="#AF0000">"child-WvkznPHasGyCxViXFeQH"</font> <font color="#878700">style</font><font color="#626262">=</font><font color="#AF0000">"background-color:#FFFFFF"</font>>
<<font color="#008700"><b>td</b></font> <font color="#878700">valign</font><font color="#626262">=</font><font color="#AF0000">"top"</font>><<font color="#008700"><b>b</b></font>>userId</<font color="#008700"><b>b</b></font>></<font color="#008700"><b>td</b></font>>
<<font color="#008700"><b>td</b></font>>5</<font color="#008700"><b>td</b></font>>
</<font color="#008700"><b>tr</b></font>>
<<font color="#008700"><b>tr</b></font> <font color="#878700">class</font><font color="#626262">=</font><font color="#AF0000">"child-WvkznPHasGyCxViXFeQH"</font> <font color="#878700">style</font><font color="#626262">=</font><font color="#AF0000">"background-color:#FFFFFF"</font>>
<<font color="#008700"><b>td</b></font> <font color="#878700">valign</font><font color="#626262">=</font><font color="#AF0000">"top"</font>><<font color="#008700"><b>b</b></font>>firstName</<font color="#008700"><b>b</b></font>></<font color="#008700"><b>td</b></font>>
<<font color="#008700"><b>td</b></font>>jone</<font color="#008700"><b>td</b></font>>
</<font color="#008700"><b>tr</b></font>>
<<font color="#008700"><b>tr</b></font> <font color="#878700">class</font><font color="#626262">=</font><font color="#AF0000">"child-WvkznPHasGyCxViXFeQH"</font> <font color="#878700">style</font><font color="#626262">=</font><font color="#AF0000">"background-color:#FFFFFF"</font>>
<<font color="#008700"><b>td</b></font> <font color="#878700">valign</font><font color="#626262">=</font><font color="#AF0000">"top"</font>><<font color="#008700"><b>b</b></font>>lastName</<font color="#008700"><b>b</b></font>></<font color="#008700"><b>td</b></font>>
<<font color="#008700"><b>td</b></font>>mac</<font color="#008700"><b>td</b></font>>
</<font color="#008700"><b>tr</b></font>>
<<font color="#008700"><b>tr</b></font> <font color="#878700">class</font><font color="#626262">=</font><font color="#AF0000">"child-WvkznPHasGyCxViXFeQH"</font> <font color="#878700">style</font><font color="#626262">=</font><font color="#AF0000">"background-color:#FFFFFF"</font>>
<<font color="#008700"><b>td</b></font> <font color="#878700">valign</font><font color="#626262">=</font><font color="#AF0000">"top"</font>><<font color="#008700"><b>b</b></font>>phoneNumber</<font color="#008700"><b>b</b></font>></<font color="#008700"><b>td</b></font>>
<<font color="#008700"><b>td</b></font>>111111111</<font color="#008700"><b>td</b></font>>
</<font color="#008700"><b>tr</b></font>>
<<font color="#008700"><b>tr</b></font> <font color="#878700">class</font><font color="#626262">=</font><font color="#AF0000">"child-WvkznPHasGyCxViXFeQH"</font> <font color="#878700">style</font><font color="#626262">=</font><font color="#AF0000">"background-color:#FFFFFF"</font>>
<<font color="#008700"><b>td</b></font> <font color="#878700">valign</font><font color="#626262">=</font><font color="#AF0000">"top"</font>><<font color="#008700"><b>b</b></font>>emailAddress</<font color="#008700"><b>b</b></font>></<font color="#008700"><b>td</b></font>>
<<font color="#008700"><b>td</b></font>>jone.mac@learningcontainer.com</<font color="#008700"><b>td</b></font>>
</<font color="#008700"><b>tr</b></font>>
</<font color="#008700"><b>table</b></font>>
</<font color="#008700"><b>td</b></font>>
</<font color="#008700"><b>tr</b></font>>
</<font color="#008700"><b>table</b></font>>
</pre>
_h in HTML,
<tt>
<table style="border-collapse:collapse;;" border=1 >
<tr class="child-mBrQwESdaSJxRrLHiwHb">
<td valign="top"><b>users</b></td>
<td>
<table style="border-collapse:collapse;;" border=1 width="100%">
<tr class="child-xbZJaLZZyftMuMkOmsrF" >
<td valign="top"><b>userId</b></td>
<td>1</td>
</tr>
<tr class="child-xbZJaLZZyftMuMkOmsrF" >
<td valign="top"><b>firstName</b></td>
<td>Krish</td>
</tr>
<tr class="child-xbZJaLZZyftMuMkOmsrF" >
<td valign="top"><b>lastName</b></td>
<td>Lee</td>
</tr>
<tr class="child-xbZJaLZZyftMuMkOmsrF" >
<td valign="top"><b>phoneNumber</b></td>
<td>123456</td>
</tr>
<tr class="child-xbZJaLZZyftMuMkOmsrF" >
<td valign="top"><b>emailAddress</b></td>
<td>krish.lee@learningcontainer.com</td>
</tr>
<tr class="child-xbZJaLZZyftMuMkOmsrF" >
<td valign="top"><b>userId</b></td>
<td>2</td>
</tr>
<tr class="child-xbZJaLZZyftMuMkOmsrF" >
<td valign="top"><b>firstName</b></td>
<td>racks</td>
</tr>
<tr class="child-xbZJaLZZyftMuMkOmsrF" >
<td valign="top"><b>lastName</b></td>
<td>jacson</td>
</tr>
<tr class="child-xbZJaLZZyftMuMkOmsrF" >
<td valign="top"><b>phoneNumber</b></td>
<td>123456</td>
</tr>
<tr class="child-xbZJaLZZyftMuMkOmsrF" >
<td valign="top"><b>emailAddress</b></td>
<td>racks.jacson@learningcontainer.com</td>
</tr>
<tr class="child-xbZJaLZZyftMuMkOmsrF" >
<td valign="top"><b>userId</b></td>
<td>3</td>
</tr>
<tr class="child-xbZJaLZZyftMuMkOmsrF" >
<td valign="top"><b>firstName</b></td>
<td>denial</td>
</tr>
<tr class="child-xbZJaLZZyftMuMkOmsrF" >
<td valign="top"><b>lastName</b></td>
<td>roast</td>
</tr>
<tr class="child-xbZJaLZZyftMuMkOmsrF" >
<td valign="top"><b>phoneNumber</b></td>
<td>33333333</td>
</tr>
<tr class="child-xbZJaLZZyftMuMkOmsrF" >
<td valign="top"><b>emailAddress</b></td>
<td>denial.roast@learningcontainer.com</td>
</tr>
<tr class="child-xbZJaLZZyftMuMkOmsrF" >
<td valign="top"><b>userId</b></td>
<td>4</td>
</tr>
<tr class="child-xbZJaLZZyftMuMkOmsrF" >
<td valign="top"><b>firstName</b></td>
<td>devid</td>
</tr>
<tr class="child-xbZJaLZZyftMuMkOmsrF" >
<td valign="top"><b>lastName</b></td>
<td>neo</td>
</tr>
<tr class="child-xbZJaLZZyftMuMkOmsrF" >
<td valign="top"><b>phoneNumber</b></td>
<td>222222222</td>
</tr>
<tr class="child-xbZJaLZZyftMuMkOmsrF" >
<td valign="top"><b>emailAddress</b></td>
<td>devid.neo@learningcontainer.com</td>
</tr>
<tr class="child-xbZJaLZZyftMuMkOmsrF" >
<td valign="top"><b>userId</b></td>
<td>5</td>
</tr>
<tr class="child-xbZJaLZZyftMuMkOmsrF" >
<td valign="top"><b>firstName</b></td>
<td>jone</td>
</tr>
<tr class="child-xbZJaLZZyftMuMkOmsrF" >
<td valign="top"><b>lastName</b></td>
<td>mac</td>
</tr>
<tr class="child-xbZJaLZZyftMuMkOmsrF" >
<td valign="top"><b>phoneNumber</b></td>
<td>111111111</td>
</tr>
<tr class="child-xbZJaLZZyftMuMkOmsrF" >
<td valign="top"><b>emailAddress</b></td>
<td>jone.mac@learningcontainer.com</td>
</tr>
</table>
</td>
</tr>
</table>
_zh table,
<header>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('tr.parent') .css("cursor", "pointer") .attr("title", "Click to expand/collapse") .click(function () {
$(this).siblings('.child-' + this.id).toggle();
});
$('tr[@class^=child-]').hide().children('td');
});
</script>
</header>
<tt>
<table style="border-collapse:collapse;;" border=1 >
<tr class="parent" id="DLvJNVyrvwldSNCapYeW" title="Click to expand/collapse" style="cursor: pointer;"> <td><b>D(1)</b></td> </tr>
<tr class="child-DLvJNVyrvwldSNCapYeW">
<td valign="top"><b>users</b></td>
<td>
<table style="border-collapse:collapse;;" border=1 width="100%">
<tr class="parent" id="ISMOWRxJylpBVUVUXmVJ" title="Click to expand/collapse" style="cursor: pointer;"> <td><b>L(5)</b></td> </tr>
<tr class="child-ISMOWRxJylpBVUVUXmVJ" >
<td valign="top"><b>userId</b></td>
<td>1</td>
</tr>
<tr class="child-ISMOWRxJylpBVUVUXmVJ" >
<td valign="top"><b>firstName</b></td>
<td>Krish</td>
</tr>
<tr class="child-ISMOWRxJylpBVUVUXmVJ" >
<td valign="top"><b>lastName</b></td>
<td>Lee</td>
</tr>
<tr class="child-ISMOWRxJylpBVUVUXmVJ" >
<td valign="top"><b>phoneNumber</b></td>
<td>123456</td>
</tr>
<tr class="child-ISMOWRxJylpBVUVUXmVJ" >
<td valign="top"><b>emailAddress</b></td>
<td>krish.lee@learningcontainer.com</td>
</tr>
<tr class="child-ISMOWRxJylpBVUVUXmVJ" >
<td valign="top"><b>userId</b></td>
<td>2</td>
</tr>
<tr class="child-ISMOWRxJylpBVUVUXmVJ" >
<td valign="top"><b>firstName</b></td>
<td>racks</td>
</tr>
<tr class="child-ISMOWRxJylpBVUVUXmVJ" >
<td valign="top"><b>lastName</b></td>
<td>jacson</td>
</tr>
<tr class="child-ISMOWRxJylpBVUVUXmVJ" >
<td valign="top"><b>phoneNumber</b></td>
<td>123456</td>
</tr>
<tr class="child-ISMOWRxJylpBVUVUXmVJ" >
<td valign="top"><b>emailAddress</b></td>
<td>racks.jacson@learningcontainer.com</td>
</tr>
<tr class="child-ISMOWRxJylpBVUVUXmVJ" >
<td valign="top"><b>userId</b></td>
<td>3</td>
</tr>
<tr class="child-ISMOWRxJylpBVUVUXmVJ" >
<td valign="top"><b>firstName</b></td>
<td>denial</td>
</tr>
<tr class="child-ISMOWRxJylpBVUVUXmVJ" >
<td valign="top"><b>lastName</b></td>
<td>roast</td>
</tr>
<tr class="child-ISMOWRxJylpBVUVUXmVJ" >
<td valign="top"><b>phoneNumber</b></td>
<td>33333333</td>
</tr>
<tr class="child-ISMOWRxJylpBVUVUXmVJ" >
<td valign="top"><b>emailAddress</b></td>
<td>denial.roast@learningcontainer.com</td>
</tr>
<tr class="child-ISMOWRxJylpBVUVUXmVJ" >
<td valign="top"><b>userId</b></td>
<td>4</td>
</tr>
<tr class="child-ISMOWRxJylpBVUVUXmVJ" >
<td valign="top"><b>firstName</b></td>
<td>devid</td>
</tr>
<tr class="child-ISMOWRxJylpBVUVUXmVJ" >
<td valign="top"><b>lastName</b></td>
<td>neo</td>
</tr>
<tr class="child-ISMOWRxJylpBVUVUXmVJ" >
<td valign="top"><b>phoneNumber</b></td>
<td>222222222</td>
</tr>
<tr class="child-ISMOWRxJylpBVUVUXmVJ" >
<td valign="top"><b>emailAddress</b></td>
<td>devid.neo@learningcontainer.com</td>
</tr>
<tr class="child-ISMOWRxJylpBVUVUXmVJ" >
<td valign="top"><b>userId</b></td>
<td>5</td>
</tr>
<tr class="child-ISMOWRxJylpBVUVUXmVJ" >
<td valign="top"><b>firstName</b></td>
<td>jone</td>
</tr>
<tr class="child-ISMOWRxJylpBVUVUXmVJ" >
<td valign="top"><b>lastName</b></td>
<td>mac</td>
</tr>
<tr class="child-ISMOWRxJylpBVUVUXmVJ" >
<td valign="top"><b>phoneNumber</b></td>
<td>111111111</td>
</tr>
<tr class="child-ISMOWRxJylpBVUVUXmVJ" >
<td valign="top"><b>emailAddress</b></td>
<td>jone.mac@learningcontainer.com</td>
</tr>
</table>
</td>
</tr>
</table>
... to be continued.
Raw data
{
"_id": null,
"home_page": "https://github.com/laowangv5/qic",
"name": "qic",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "json,yaml,xml,query,jq,dq,dsq,dsquery,qic,dataquery,json query,xml query,yaml query,jello,jq",
"author": "Yonghang Wang",
"author_email": "wyhang@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/cb/2c/b4526b9ae1577bc44f09ded4be6c981954a943f16fdadc89689201c696ba/qic-1.1.20.tar.gz",
"platform": null,
"description": "## [doc on github.io](https://walkerever.github.io/)\n\n\n# qic - Query In Console\n\n![qic show](/docs/assets/images/qic.show.gif)\n\nJSON/YAML/XML comand line query tool with interactive mode.\n\nBy design, it tries to keep simple. There're a lot compromises. It's not intending to embed a full syntax/sementic engine. For complicated situation, other than introducing very long single line expression, please try code blocks where you can use any python syntax.\n\nThis document is available with better format on github.io [QiC](https://laowangv5.github.io/qic/) where colorful text can be used for terminal output.\n\n- [Installation](#installation)\n- [Basics](#basics)\n- [Check expanded code](#check-expanded-code)\n- [Keys with special chars](#keys-with-special-chars)\n- [Interactive mode](#interactive-mode)\n- [Validate/Convert JSON/YAML/XML](#validate-and-convert-jsonxmlyaml)\n- [Limit rows](#limit-rows)\n- [Load extra modules](#load-extra-modules)\n- [JSON/YAML/XML to HTML](#json-to-html)\n\n----\n\n-----\n\n## Installation\n\n`python -mpip install qic`\n\nrun it \n\n`qic` or `python -mqic`\n\n----\n## Basics\n\nby default it will validate, reformat and color the JSON stream. \n\n\"_\" means the document root. This is the default value. \n\n<pre>(py3) [me@mtp qic]$ cat test/s1.json | qic # _\n[\n {\n <font color=\"#008700\"><b>"_id"</b></font>: {\n <font color=\"#008700\"><b>"$oid"</b></font>: <font color=\"#AF0000\">"5968dd23fc13ae04d9000001"</font>\n },\n <font color=\"#008700\"><b>"product_name"</b></font>: <font color=\"#AF0000\">"sildenafil citrate"</font>,\n <font color=\"#008700\"><b>"supplier"</b></font>: <font color=\"#AF0000\">"Wisozk Inc"</font>,\n <font color=\"#008700\"><b>"quantity"</b></font>: <font color=\"#626262\">261</font>,\n <font color=\"#008700\"><b>"unit_cost"</b></font>: <font color=\"#AF0000\">"$10.47"</font>\n },\n {\n <font color=\"#008700\"><b>"_id"</b></font>: {\n <font color=\"#008700\"><b>"$oid"</b></font>: <font color=\"#AF0000\">"5968dd23fc13ae04d9000002"</font>\n },\n <font color=\"#008700\"><b>"product_name"</b></font>: <font color=\"#AF0000\">"Mountain Juniperus ashei"</font>,\n <font color=\"#008700\"><b>"supplier"</b></font>: <font color=\"#AF0000\">"Keebler-Hilpert"</font>,\n <font color=\"#008700\"><b>"quantity"</b></font>: <font color=\"#626262\">292</font>,\n <font color=\"#008700\"><b>"unit_cost"</b></font>: <font color=\"#AF0000\">"$8.74"</font>\n },\n {\n <font color=\"#008700\"><b>"_id"</b></font>: {\n <font color=\"#008700\"><b>"$oid"</b></font>: <font color=\"#AF0000\">"5968dd23fc13ae04d9000003"</font>\n },\n <font color=\"#008700\"><b>"product_name"</b></font>: <font color=\"#AF0000\">"Dextromathorphan HBr"</font>,\n <font color=\"#008700\"><b>"supplier"</b></font>: <font color=\"#AF0000\">"Schmitt-Weissnat"</font>,\n <font color=\"#008700\"><b>"quantity"</b></font>: <font color=\"#626262\">211</font>,\n <font color=\"#008700\"><b>"unit_cost"</b></font>: <font color=\"#AF0000\">"$20.53"</font>\n }\n]\n</pre>\n\nquery its conent, \n\n<pre>(py3) [me@mtp qic]$ cat test/s1.json | qic "_[0]"\n{\n <font color=\"#008700\"><b>"_id"</b></font>: {\n <font color=\"#008700\"><b>"$oid"</b></font>: <font color=\"#AF0000\">"5968dd23fc13ae04d9000001"</font>\n },\n <font color=\"#008700\"><b>"product_name"</b></font>: <font color=\"#AF0000\">"sildenafil citrate"</font>,\n <font color=\"#008700\"><b>"supplier"</b></font>: <font color=\"#AF0000\">"Wisozk Inc"</font>,\n <font color=\"#008700\"><b>"quantity"</b></font>: <font color=\"#626262\">261</font>,\n <font color=\"#008700\"><b>"unit_cost"</b></font>: <font color=\"#AF0000\">"$10.47"</font>\n}\n\n(py3) [me@mtp qic]$ \n(py3) [me@mtp qic]$ cat test/s1.json | qic "_[0]._id"\n{\n <font color=\"#008700\"><b>"$oid"</b></font>: <font color=\"#AF0000\">"5968dd23fc13ae04d9000001"</font>\n}\n\n(py3) [me@mtp qic]$ \n(py3) [me@mtp qic]$ cat test/s1.json | qic "_[0].product_name"\nsildenafil citrate\n\n(py3) [me@mtp qic]$ \n(py3) [me@mtp qic]$ cat test/s1.json | qic "_[0].{product_name, quantity, unit_cost}"\n{\n <font color=\"#008700\"><b>"product_name"</b></font>: <font color=\"#AF0000\">"sildenafil citrate"</font>,\n <font color=\"#008700\"><b>"quantity"</b></font>: <font color=\"#626262\">261</font>,\n <font color=\"#008700\"><b>"unit_cost"</b></font>: <font color=\"#AF0000\">"$10.47"</font>\n}\n\n(py3) [me@mtp qic]$ \n(py3) [me@mtp qic]$ cat test/s1.json | qic "_[]._id"\n[\n {\n <font color=\"#008700\"><b>"$oid"</b></font>: <font color=\"#AF0000\">"5968dd23fc13ae04d9000001"</font>\n },\n {\n <font color=\"#008700\"><b>"$oid"</b></font>: <font color=\"#AF0000\">"5968dd23fc13ae04d9000002"</font>\n },\n {\n <font color=\"#008700\"><b>"$oid"</b></font>: <font color=\"#AF0000\">"5968dd23fc13ae04d9000003"</font>\n }\n]\n\n(py3) [me@mtp qic]$ \n(py3) [me@mtp qic]$ cat test/s1.json | qic "_[].{_id,quantity}"\n[\n {\n <font color=\"#008700\"><b>"_id"</b></font>: {\n <font color=\"#008700\"><b>"$oid"</b></font>: <font color=\"#AF0000\">"5968dd23fc13ae04d9000001"</font>\n },\n <font color=\"#008700\"><b>"quantity"</b></font>: <font color=\"#626262\">261</font>\n },\n {\n <font color=\"#008700\"><b>"_id"</b></font>: {\n <font color=\"#008700\"><b>"$oid"</b></font>: <font color=\"#AF0000\">"5968dd23fc13ae04d9000002"</font>\n },\n <font color=\"#008700\"><b>"quantity"</b></font>: <font color=\"#626262\">292</font>\n },\n {\n <font color=\"#008700\"><b>"_id"</b></font>: {\n <font color=\"#008700\"><b>"$oid"</b></font>: <font color=\"#AF0000\">"5968dd23fc13ae04d9000003"</font>\n },\n <font color=\"#008700\"><b>"quantity"</b></font>: <font color=\"#626262\">211</font>\n }\n]\n</pre>\n\n----\n\n## Check expanded code\n\n<pre>(py3) [me@mtp qic]$ cat test/s1.json | qic "_[]._id" -X\n<font color=\"#33C7DE\"># run : </font>\n[ _umy['_id'] for _umy in _ ]\n[\n {\n <font color=\"#008700\"><b>"$oid"</b></font>: <font color=\"#AF0000\">"5968dd23fc13ae04d9000001"</font>\n },\n {\n <font color=\"#008700\"><b>"$oid"</b></font>: <font color=\"#AF0000\">"5968dd23fc13ae04d9000002"</font>\n },\n {\n <font color=\"#008700\"><b>"$oid"</b></font>: <font color=\"#AF0000\">"5968dd23fc13ae04d9000003"</font>\n }\n]\n\n(py3) [me@mtp qic]$ cat test/s1.json | qic "[ _[0].product_name ]" -X\n<font color=\"#33C7DE\"># run : </font>\n[ _[0]['product_name'] ]\n[\n <font color=\"#AF0000\">"sildenafil citrate"</font>\n]\n\n(py3) [me@mtp qic]$ \n(py3) [me@mtp qic]$ cat test/s1.json | qic "_[].{_id,quantity}" -X\n<font color=\"#33C7DE\"># run : </font>\n[ {'_id':_emt['_id'],'quantity':_emt['quantity']} for _emt in _ ]\n[\n {\n <font color=\"#008700\"><b>"_id"</b></font>: {\n <font color=\"#008700\"><b>"$oid"</b></font>: <font color=\"#AF0000\">"5968dd23fc13ae04d9000001"</font>\n },\n <font color=\"#008700\"><b>"quantity"</b></font>: <font color=\"#626262\">261</font>\n },\n {\n <font color=\"#008700\"><b>"_id"</b></font>: {\n <font color=\"#008700\"><b>"$oid"</b></font>: <font color=\"#AF0000\">"5968dd23fc13ae04d9000002"</font>\n },\n <font color=\"#008700\"><b>"quantity"</b></font>: <font color=\"#626262\">292</font>\n },\n {\n <font color=\"#008700\"><b>"_id"</b></font>: {\n <font color=\"#008700\"><b>"$oid"</b></font>: <font color=\"#AF0000\">"5968dd23fc13ae04d9000003"</font>\n },\n <font color=\"#008700\"><b>"quantity"</b></font>: <font color=\"#626262\">211</font>\n }\n]\n\n\n(py3) [me@mtp qic]$ cat test/s1.json | qic "_[0].{_id,quantity}" -X\n<font color=\"#33C7DE\"># run : </font>\n{'_id':_[0]['_id'],'quantity':_[0]['quantity']}\n{\n <font color=\"#008700\"><b>"_id"</b></font>: {\n <font color=\"#008700\"><b>"$oid"</b></font>: <font color=\"#AF0000\">"5968dd23fc13ae04d9000001"</font>\n },\n <font color=\"#008700\"><b>"quantity"</b></font>: <font color=\"#626262\">261</font>\n}\n</pre>\n\n-----\n\n## Keys with special chars\n\nlook at below changed JSON, `product_name` is renamed to `product.name`. This will break the dot expansion QiC is using. In this situation, use `<>` to mark content within is a single unit.\n\n<pre>(py3) [me@mtp qic]$ qic -f test/s1x.json \n[\n {\n <font color=\"#008700\"><b>"_id"</b></font>: {\n <font color=\"#008700\"><b>"$oid"</b></font>: <font color=\"#AF0000\">"5968dd23fc13ae04d9000001"</font>\n },\n <font color=\"#008700\"><b>"product.name"</b></font>: <font color=\"#AF0000\">"sildenafil citrate"</font>,\n <font color=\"#008700\"><b>"supplier"</b></font>: <font color=\"#AF0000\">"Wisozk Inc"</font>,\n <font color=\"#008700\"><b>"quantity"</b></font>: <font color=\"#626262\">261</font>,\n <font color=\"#008700\"><b>"unit_cost"</b></font>: <font color=\"#AF0000\">"$10.47"</font>\n },\n {\n <font color=\"#008700\"><b>"_id"</b></font>: {\n <font color=\"#008700\"><b>"$oid"</b></font>: <font color=\"#AF0000\">"5968dd23fc13ae04d9000002"</font>\n },\n <font color=\"#008700\"><b>"product.name"</b></font>: <font color=\"#AF0000\">"Mountain Juniperus ashei"</font>,\n <font color=\"#008700\"><b>"supplier"</b></font>: <font color=\"#AF0000\">"Keebler-Hilpert"</font>,\n <font color=\"#008700\"><b>"quantity"</b></font>: <font color=\"#626262\">292</font>,\n <font color=\"#008700\"><b>"unit_cost"</b></font>: <font color=\"#AF0000\">"$8.74"</font>\n },\n {\n <font color=\"#008700\"><b>"_id"</b></font>: {\n <font color=\"#008700\"><b>"$oid"</b></font>: <font color=\"#AF0000\">"5968dd23fc13ae04d9000003"</font>\n },\n <font color=\"#008700\"><b>"product.name"</b></font>: <font color=\"#AF0000\">"Dextromathorphan HBr"</font>,\n <font color=\"#008700\"><b>"supplier"</b></font>: <font color=\"#AF0000\">"Schmitt-Weissnat"</font>,\n <font color=\"#008700\"><b>"quantity"</b></font>: <font color=\"#626262\">211</font>,\n <font color=\"#008700\"><b>"unit_cost"</b></font>: <font color=\"#AF0000\">"$20.53"</font>\n }\n]\n\n(py3) [me@mtp qic]$ \n(py3) [me@mtp qic]$ qic -f test/s1x.json "_[].product.name"\n<font color=\"#E9AD0C\"># expanded code :</font>\n<font color=\"#E9AD0C\">[ _kom['product']['name'] for _kom in _ ]</font>\n<font color=\"#E9AD0C\"># KeyError: 'product'</font>\n(py3) [me@mtp qic]$ \n(py3) [me@mtp qic]$ qic -f test/s1x.json "_[].<product.name>"\n[\n <font color=\"#AF0000\">"sildenafil citrate"</font>,\n <font color=\"#AF0000\">"Mountain Juniperus ashei"</font>,\n <font color=\"#AF0000\">"Dextromathorphan HBr"</font>\n]\n</pre>\n\n-----\n\n## Interactive Mode\n\n`-I` enable interactive mode. \n\nQic will read user input from sys.stdin. so, for input stream, it could not be from unix pipe, instead use `-f` opiton. \n\nwhen type `_` , a small menu is promptec all internal functions started with `_`. \n\nBefore prompted for user input, all keys in the JSON are stored for word completion prompt -- as you may have noticed, they're case insenstive. \n\n\n\n<pre>(py3) [me@mtp qic]$ qic -f test/s6.json -I\n[qic] $ _\n <span style=\"background-color:#BCBCBC\"><font color=\"#FFFFFF\"> _ </font></span><span style=\"background-color:#444444\"><font color=\"#FFFFFF\"> </font></span>\n <span style=\"background-color:#BCBCBC\"><font color=\"#FFFFFF\"> _fl </font></span><span style=\"background-color:#444444\"><font color=\"#FFFFFF\"> </font></span>\n <span style=\"background-color:#BCBCBC\"><font color=\"#FFFFFF\"> _flatlist </font></span><span style=\"background-color:#444444\"><font color=\"#FFFFFF\"> </font></span>\n <span style=\"background-color:#BCBCBC\"><font color=\"#FFFFFF\"> _j </font></span><span style=\"background-color:#444444\"><font color=\"#FFFFFF\"> </font></span>\n <span style=\"background-color:#BCBCBC\"><font color=\"#FFFFFF\"> _l </font></span><span style=\"background-color:#A8A8A8\"><font color=\"#FFFFFF\"> </font></span>\n <span style=\"background-color:#BCBCBC\"><font color=\"#FFFFFF\"> _l2pt </font></span><span style=\"background-color:#A8A8A8\"><font color=\"#FFFFFF\"> </font></span>\n <span style=\"background-color:#BCBCBC\"><font color=\"#FFFFFF\"> _l2t </font></span><span style=\"background-color:#A8A8A8\"><font color=\"#FFFFFF\"> </font></span>\n\n</pre>\n\n<pre>[qic] $ _<font color=\"#626262\">.</font>users[<font color=\"#626262\">0</font>]<font color=\"#626262\">.</font>f\n <span style=\"background-color:#BCBCBC\"><font color=\"#FFFFFF\"> firstname </font></span><span style=\"background-color:#444444\"><font color=\"#FFFFFF\"> </font></span>\n</pre>\n<pre>[qic] $ _<font color=\"#626262\">.</font>users[<font color=\"#626262\">0</font>]<font color=\"#626262\">.</font>firstname\nKrish</pre>\n\n_l2t is an internal function which print \"standard\" table. \\\n\n<pre>\n[qic] $ _l2t(_<font color=\"#626262\">.</font>users)\n<b>userId firstName lastName phoneNumber emailAddress</b>\n------------------------------------------------------------------------\n1 Krish Lee 123456 krish.lee@learningcontainer.com\n2 racks jacson 123456 racks.jacson@learningcontainer.com\n3 denial roast 33333333 denial.roast@learningcontainer.com\n4 devid neo 222222222 devid.neo@learningcontainer.com\n5 jone mac 111111111 jone.mac@learningcontainer.com\n\n</pre>\n\nuse `'''` to mark code block start and end.\n\n<pre>[qic] $\n[qic] $ <font color=\"#AF0000\">'''</font>\n[qic] $ guys <font color=\"#626262\">=</font> <font color=\"#AF0000\">""</font>\n[qic] $ <font color=\"#008700\"><b>for</b></font> i <font color=\"#AF00FF\"><b>in</b></font> _<font color=\"#626262\">.</font>users :\n[qic] $ guys <font color=\"#626262\">+=</font> i<font color=\"#626262\">.</font>firstname <font color=\"#626262\">+</font> i<font color=\"#626262\">.</font>lastname <font color=\"#626262\">+</font> <font color=\"#AF0000\">", "</font>\n[qic] $ <font color=\"#008700\">print</font>(<font color=\"#AF0000\">"List :"</font>, guys<font color=\"#626262\">.</font>rstrip())\n[qic] $\n[qic] $ <font color=\"#AF0000\">'''</font>\nList : KrishLee, racksjacson, denialroast, devidneo, jonemac,\n[qic] $\n[qic] $\n</pre>\n\nuse `\\q` or `quit()` to leave Qic.\n\n<pre>(py3) [me@mtp qic]$ \n(py3) [me@mtp qic]$ qic -f test/s6.json -I\n[qic] $\n[qic] $ \\q\n(py3) [me@mtp qic]$ \n(py3) [me@mtp qic]$ qic -f test/s6.json -I\n[qic] $ quit()\n(py3) [me@mtp qic]$ \n</pre>\n\n## Validate and Convert JSON/XML/YAML\n\nwithout any parameters, feed input into QiC and it will serve as a format validator ( plus foramatter, etc.). \n\n`-t` specify source as JSON, YAML or XML. here all examples are from JSON format and `JSON` is the default type. Choose the right one if you're going to working with YAML or XML. \n\nInternal function `_json` or `-j` will dump output as well formatted JSON and this is the default behaviour. \n\n`_yaml` or `_y` will dump well formatted YAML, while `_xml` or `_x` will dump well formatted XML.\n\nspecify them in format of `_x($expr)`, if for full doc, say, `_x(_)`, just use `_x`.\n\n<pre>(py3) [me@mtp qic]$ qic -f test/s6.json _x\n<font color=\"#AF8700\"><?xml version="1.0" ?></font>\n<font color=\"#008700\"><b><root></b></font>\n\t<font color=\"#008700\"><b><users</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"list"</font><font color=\"#008700\"><b>></b></font>\n\t\t<font color=\"#008700\"><b><item</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"dict"</font><font color=\"#008700\"><b>></b></font>\n\t\t\t<font color=\"#008700\"><b><userId</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"int"</font><font color=\"#008700\"><b>></b></font>1<font color=\"#008700\"><b></userId></b></font>\n\t\t\t<font color=\"#008700\"><b><firstName</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"str"</font><font color=\"#008700\"><b>></b></font>Krish<font color=\"#008700\"><b></firstName></b></font>\n\t\t\t<font color=\"#008700\"><b><lastName</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"str"</font><font color=\"#008700\"><b>></b></font>Lee<font color=\"#008700\"><b></lastName></b></font>\n\t\t\t<font color=\"#008700\"><b><phoneNumber</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"str"</font><font color=\"#008700\"><b>></b></font>123456<font color=\"#008700\"><b></phoneNumber></b></font>\n\t\t\t<font color=\"#008700\"><b><emailAddress</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"str"</font><font color=\"#008700\"><b>></b></font>krish.lee@learningcontainer.com<font color=\"#008700\"><b></emailAddress></b></font>\n\t\t<font color=\"#008700\"><b></item></b></font>\n\t\t<font color=\"#008700\"><b><item</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"dict"</font><font color=\"#008700\"><b>></b></font>\n\t\t\t<font color=\"#008700\"><b><userId</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"int"</font><font color=\"#008700\"><b>></b></font>2<font color=\"#008700\"><b></userId></b></font>\n\t\t\t<font color=\"#008700\"><b><firstName</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"str"</font><font color=\"#008700\"><b>></b></font>racks<font color=\"#008700\"><b></firstName></b></font>\n\t\t\t<font color=\"#008700\"><b><lastName</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"str"</font><font color=\"#008700\"><b>></b></font>jacson<font color=\"#008700\"><b></lastName></b></font>\n\t\t\t<font color=\"#008700\"><b><phoneNumber</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"str"</font><font color=\"#008700\"><b>></b></font>123456<font color=\"#008700\"><b></phoneNumber></b></font>\n\t\t\t<font color=\"#008700\"><b><emailAddress</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"str"</font><font color=\"#008700\"><b>></b></font>racks.jacson@learningcontainer.com<font color=\"#008700\"><b></emailAddress></b></font>\n\t\t<font color=\"#008700\"><b></item></b></font>\n\t\t<font color=\"#008700\"><b><item</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"dict"</font><font color=\"#008700\"><b>></b></font>\n\t\t\t<font color=\"#008700\"><b><userId</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"int"</font><font color=\"#008700\"><b>></b></font>3<font color=\"#008700\"><b></userId></b></font>\n\t\t\t<font color=\"#008700\"><b><firstName</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"str"</font><font color=\"#008700\"><b>></b></font>denial<font color=\"#008700\"><b></firstName></b></font>\n\t\t\t<font color=\"#008700\"><b><lastName</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"str"</font><font color=\"#008700\"><b>></b></font>roast<font color=\"#008700\"><b></lastName></b></font>\n\t\t\t<font color=\"#008700\"><b><phoneNumber</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"str"</font><font color=\"#008700\"><b>></b></font>33333333<font color=\"#008700\"><b></phoneNumber></b></font>\n\t\t\t<font color=\"#008700\"><b><emailAddress</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"str"</font><font color=\"#008700\"><b>></b></font>denial.roast@learningcontainer.com<font color=\"#008700\"><b></emailAddress></b></font>\n\t\t<font color=\"#008700\"><b></item></b></font>\n\t\t<font color=\"#008700\"><b><item</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"dict"</font><font color=\"#008700\"><b>></b></font>\n\t\t\t<font color=\"#008700\"><b><userId</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"int"</font><font color=\"#008700\"><b>></b></font>4<font color=\"#008700\"><b></userId></b></font>\n\t\t\t<font color=\"#008700\"><b><firstName</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"str"</font><font color=\"#008700\"><b>></b></font>devid<font color=\"#008700\"><b></firstName></b></font>\n\t\t\t<font color=\"#008700\"><b><lastName</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"str"</font><font color=\"#008700\"><b>></b></font>neo<font color=\"#008700\"><b></lastName></b></font>\n\t\t\t<font color=\"#008700\"><b><phoneNumber</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"str"</font><font color=\"#008700\"><b>></b></font>222222222<font color=\"#008700\"><b></phoneNumber></b></font>\n\t\t\t<font color=\"#008700\"><b><emailAddress</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"str"</font><font color=\"#008700\"><b>></b></font>devid.neo@learningcontainer.com<font color=\"#008700\"><b></emailAddress></b></font>\n\t\t<font color=\"#008700\"><b></item></b></font>\n\t\t<font color=\"#008700\"><b><item</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"dict"</font><font color=\"#008700\"><b>></b></font>\n\t\t\t<font color=\"#008700\"><b><userId</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"int"</font><font color=\"#008700\"><b>></b></font>5<font color=\"#008700\"><b></userId></b></font>\n\t\t\t<font color=\"#008700\"><b><firstName</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"str"</font><font color=\"#008700\"><b>></b></font>jone<font color=\"#008700\"><b></firstName></b></font>\n\t\t\t<font color=\"#008700\"><b><lastName</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"str"</font><font color=\"#008700\"><b>></b></font>mac<font color=\"#008700\"><b></lastName></b></font>\n\t\t\t<font color=\"#008700\"><b><phoneNumber</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"str"</font><font color=\"#008700\"><b>></b></font>111111111<font color=\"#008700\"><b></phoneNumber></b></font>\n\t\t\t<font color=\"#008700\"><b><emailAddress</b></font> <font color=\"#878700\">type=</font><font color=\"#AF0000\">"str"</font><font color=\"#008700\"><b>></b></font>jone.mac@learningcontainer.com<font color=\"#008700\"><b></emailAddress></b></font>\n\t\t<font color=\"#008700\"><b></item></b></font>\n\t<font color=\"#008700\"><b></users></b></font>\n<font color=\"#008700\"><b></root></b></font>\n\n(py3) [me@mtp qic]$ \n(py3) [me@mtp qic]$ qic -f test/s6.json _y\n<font color=\"#0000FF\"><b>---</b></font>\n<font color=\"#008700\"><b>users</b></font>:\n- <font color=\"#008700\"><b>emailAddress</b></font>: krish.lee@learningcontainer.com\n <font color=\"#008700\"><b>firstName</b></font>: Krish\n <font color=\"#008700\"><b>lastName</b></font>: Lee\n <font color=\"#008700\"><b>phoneNumber</b></font>: <font color=\"#AF0000\">'123456'</font>\n <font color=\"#008700\"><b>userId</b></font>: 1\n- <font color=\"#008700\"><b>emailAddress</b></font>: racks.jacson@learningcontainer.com\n <font color=\"#008700\"><b>firstName</b></font>: racks\n <font color=\"#008700\"><b>lastName</b></font>: jacson\n <font color=\"#008700\"><b>phoneNumber</b></font>: <font color=\"#AF0000\">'123456'</font>\n <font color=\"#008700\"><b>userId</b></font>: 2\n- <font color=\"#008700\"><b>emailAddress</b></font>: denial.roast@learningcontainer.com\n <font color=\"#008700\"><b>firstName</b></font>: denial\n <font color=\"#008700\"><b>lastName</b></font>: roast\n <font color=\"#008700\"><b>phoneNumber</b></font>: <font color=\"#AF0000\">'33333333'</font>\n <font color=\"#008700\"><b>userId</b></font>: 3\n- <font color=\"#008700\"><b>emailAddress</b></font>: devid.neo@learningcontainer.com\n <font color=\"#008700\"><b>firstName</b></font>: devid\n <font color=\"#008700\"><b>lastName</b></font>: neo\n <font color=\"#008700\"><b>phoneNumber</b></font>: <font color=\"#AF0000\">'222222222'</font>\n <font color=\"#008700\"><b>userId</b></font>: 4\n- <font color=\"#008700\"><b>emailAddress</b></font>: jone.mac@learningcontainer.com\n <font color=\"#008700\"><b>firstName</b></font>: jone\n <font color=\"#008700\"><b>lastName</b></font>: mac\n <font color=\"#008700\"><b>phoneNumber</b></font>: <font color=\"#AF0000\">'111111111'</font>\n <font color=\"#008700\"><b>userId</b></font>: 5\n\n(py3) [me@mtp qic]$ \n(py3) [me@mtp qic]$ qic -f test/s6.json '_y(_)'\n<font color=\"#0000FF\"><b>---</b></font>\n<font color=\"#008700\"><b>users</b></font>:\n- <font color=\"#008700\"><b>emailAddress</b></font>: krish.lee@learningcontainer.com\n <font color=\"#008700\"><b>firstName</b></font>: Krish\n <font color=\"#008700\"><b>lastName</b></font>: Lee\n <font color=\"#008700\"><b>phoneNumber</b></font>: <font color=\"#AF0000\">'123456'</font>\n <font color=\"#008700\"><b>userId</b></font>: 1\n- <font color=\"#008700\"><b>emailAddress</b></font>: racks.jacson@learningcontainer.com\n <font color=\"#008700\"><b>firstName</b></font>: racks\n <font color=\"#008700\"><b>lastName</b></font>: jacson\n <font color=\"#008700\"><b>phoneNumber</b></font>: <font color=\"#AF0000\">'123456'</font>\n <font color=\"#008700\"><b>userId</b></font>: 2\n- <font color=\"#008700\"><b>emailAddress</b></font>: denial.roast@learningcontainer.com\n <font color=\"#008700\"><b>firstName</b></font>: denial\n <font color=\"#008700\"><b>lastName</b></font>: roast\n <font color=\"#008700\"><b>phoneNumber</b></font>: <font color=\"#AF0000\">'33333333'</font>\n <font color=\"#008700\"><b>userId</b></font>: 3\n- <font color=\"#008700\"><b>emailAddress</b></font>: devid.neo@learningcontainer.com\n <font color=\"#008700\"><b>firstName</b></font>: devid\n <font color=\"#008700\"><b>lastName</b></font>: neo\n <font color=\"#008700\"><b>phoneNumber</b></font>: <font color=\"#AF0000\">'222222222'</font>\n <font color=\"#008700\"><b>userId</b></font>: 4\n- <font color=\"#008700\"><b>emailAddress</b></font>: jone.mac@learningcontainer.com\n <font color=\"#008700\"><b>firstName</b></font>: jone\n <font color=\"#008700\"><b>lastName</b></font>: mac\n <font color=\"#008700\"><b>phoneNumber</b></font>: <font color=\"#AF0000\">'111111111'</font>\n <font color=\"#008700\"><b>userId</b></font>: 5\n\n(py3) [me@mtp qic]$ \n(py3) [me@mtp qic]$ qic -f test/s6.json '_y(_.users[:2])'\n<font color=\"#0000FF\"><b>---</b></font>\n- <font color=\"#008700\"><b>emailAddress</b></font>: krish.lee@learningcontainer.com\n <font color=\"#008700\"><b>firstName</b></font>: Krish\n <font color=\"#008700\"><b>lastName</b></font>: Lee\n <font color=\"#008700\"><b>phoneNumber</b></font>: <font color=\"#AF0000\">'123456'</font>\n <font color=\"#008700\"><b>userId</b></font>: 1\n- <font color=\"#008700\"><b>emailAddress</b></font>: racks.jacson@learningcontainer.com\n <font color=\"#008700\"><b>firstName</b></font>: racks\n <font color=\"#008700\"><b>lastName</b></font>: jacson\n <font color=\"#008700\"><b>phoneNumber</b></font>: <font color=\"#AF0000\">'123456'</font>\n <font color=\"#008700\"><b>userId</b></font>: 2\n\n(py3) [me@mtp qic]$ </pre>\n\n\n## Limit rows \n\nwhen the embeded list is huge, we may only want to see a few of them. \nslice `[:$n]` can be used for specified list, but `-l $n` apply to all lists included. \n\n<pre>(py3) [me@mtp qic]$ qic -f test/s6.json '_.users' | qic _y\n<font color=\"#0000FF\"><b>---</b></font>\n- <font color=\"#008700\"><b>emailAddress</b></font>: krish.lee@learningcontainer.com\n <font color=\"#008700\"><b>firstName</b></font>: Krish\n <font color=\"#008700\"><b>lastName</b></font>: Lee\n <font color=\"#008700\"><b>phoneNumber</b></font>: <font color=\"#AF0000\">'123456'</font>\n <font color=\"#008700\"><b>userId</b></font>: 1\n- <font color=\"#008700\"><b>emailAddress</b></font>: racks.jacson@learningcontainer.com\n <font color=\"#008700\"><b>firstName</b></font>: racks\n <font color=\"#008700\"><b>lastName</b></font>: jacson\n <font color=\"#008700\"><b>phoneNumber</b></font>: <font color=\"#AF0000\">'123456'</font>\n <font color=\"#008700\"><b>userId</b></font>: 2\n- <font color=\"#008700\"><b>emailAddress</b></font>: denial.roast@learningcontainer.com\n <font color=\"#008700\"><b>firstName</b></font>: denial\n <font color=\"#008700\"><b>lastName</b></font>: roast\n <font color=\"#008700\"><b>phoneNumber</b></font>: <font color=\"#AF0000\">'33333333'</font>\n <font color=\"#008700\"><b>userId</b></font>: 3\n- <font color=\"#008700\"><b>emailAddress</b></font>: devid.neo@learningcontainer.com\n <font color=\"#008700\"><b>firstName</b></font>: devid\n <font color=\"#008700\"><b>lastName</b></font>: neo\n <font color=\"#008700\"><b>phoneNumber</b></font>: <font color=\"#AF0000\">'222222222'</font>\n <font color=\"#008700\"><b>userId</b></font>: 4\n- <font color=\"#008700\"><b>emailAddress</b></font>: jone.mac@learningcontainer.com\n <font color=\"#008700\"><b>firstName</b></font>: jone\n <font color=\"#008700\"><b>lastName</b></font>: mac\n <font color=\"#008700\"><b>phoneNumber</b></font>: <font color=\"#AF0000\">'111111111'</font>\n <font color=\"#008700\"><b>userId</b></font>: 5\n\n(py3) [me@mtp qic]$ qic -f test/s6.json -l2 '_.users' | qic _y\n<font color=\"#33C7DE\"># _[] 5 -> 2</font>\n<font color=\"#0000FF\"><b>---</b></font>\n- <font color=\"#008700\"><b>emailAddress</b></font>: krish.lee@learningcontainer.com\n <font color=\"#008700\"><b>firstName</b></font>: Krish\n <font color=\"#008700\"><b>lastName</b></font>: Lee\n <font color=\"#008700\"><b>phoneNumber</b></font>: <font color=\"#AF0000\">'123456'</font>\n <font color=\"#008700\"><b>userId</b></font>: 1\n- <font color=\"#008700\"><b>emailAddress</b></font>: racks.jacson@learningcontainer.com\n <font color=\"#008700\"><b>firstName</b></font>: racks\n <font color=\"#008700\"><b>lastName</b></font>: jacson\n <font color=\"#008700\"><b>phoneNumber</b></font>: <font color=\"#AF0000\">'123456'</font>\n <font color=\"#008700\"><b>userId</b></font>: 2\n\n(py3) [me@mtp qic]$ qic -f test/s6.json -l2 '_.users[:2]' \n[\n {\n <font color=\"#008700\"><b>"userId"</b></font>: <font color=\"#626262\">1</font>,\n <font color=\"#008700\"><b>"firstName"</b></font>: <font color=\"#AF0000\">"Krish"</font>,\n <font color=\"#008700\"><b>"lastName"</b></font>: <font color=\"#AF0000\">"Lee"</font>,\n <font color=\"#008700\"><b>"phoneNumber"</b></font>: <font color=\"#AF0000\">"123456"</font>,\n <font color=\"#008700\"><b>"emailAddress"</b></font>: <font color=\"#AF0000\">"krish.lee@learningcontainer.com"</font>\n },\n {\n <font color=\"#008700\"><b>"userId"</b></font>: <font color=\"#626262\">2</font>,\n <font color=\"#008700\"><b>"firstName"</b></font>: <font color=\"#AF0000\">"racks"</font>,\n <font color=\"#008700\"><b>"lastName"</b></font>: <font color=\"#AF0000\">"jacson"</font>,\n <font color=\"#008700\"><b>"phoneNumber"</b></font>: <font color=\"#AF0000\">"123456"</font>,\n <font color=\"#008700\"><b>"emailAddress"</b></font>: <font color=\"#AF0000\">"racks.jacson@learningcontainer.com"</font>\n }\n]\n</pre>\n\n\n\n\n## load extra modules\nload module/class/function from python source files.\n\n<pre><font color=\"#00AFFF\">yonghang</font>@<font color=\"#FF8700\">mtp</font><font color=\"#00AFFF\">~</font> $ cat ~/tmp/tm.py \n\ndef xxlen(ds) :\n return str(len(ds)) + " : " + str(ds)\n\n<font color=\"#00AFFF\">yonghang</font>@<font color=\"#FF8700\">mtp</font><font color=\"#00AFFF\">~</font> $ curl -s walkerever.com/share/test/json/s6.json | qic -m ~/tmp/tm.py "tm.xxlen(_)"\n1 : {'users': [{'userId': 1, 'firstName': 'Krish', 'lastName': 'Lee', 'phoneNumber': '123456', 'emailAddress': 'krish.lee@learningcontainer.com'}, {'userId': 2, 'firstName': 'racks', 'lastName': 'jacson', 'phoneNumber': '123456', 'emailAddress': 'racks.jacson@learningcontainer.com'}, {'userId': 3, 'firstName': 'denial', 'lastName': 'roast', 'phoneNumber': '33333333', 'emailAddress': 'denial.roast@learningcontainer.com'}, {'userId': 4, 'firstName': 'devid', 'lastName': 'neo', 'phoneNumber': '222222222', 'emailAddress': 'devid.neo@learningcontainer.com'}, {'userId': 5, 'firstName': 'jone', 'lastName': 'mac', 'phoneNumber': '111111111', 'emailAddress': 'jone.mac@learningcontainer.com'}]}\n</pre>\n\nyou can load more,\n\n<pre><font color=\"#00AFFF\">yonghang</font>@<font color=\"#FF8700\">mtp</font><font color=\"#00AFFF\">~</font> $ curl -s walkerever.com/share/test/json/s6.json | qic -m ~/tmp/tm.py,json,yaml "tm.xxlen(_)" \n1 : {'users': [{'userId': 1, 'firstName': 'Krish', 'lastName': 'Lee', 'phoneNumber': '123456', 'emailAddress': 'krish.lee@learningcontainer.com'}, {'userId': 2, 'firstName': 'racks', 'lastName': 'jacson', 'phoneNumber': '123456', 'emailAddress': 'racks.jacson@learningcontainer.com'}, {'userId': 3, 'firstName': 'denial', 'lastName': 'roast', 'phoneNumber': '33333333', 'emailAddress': 'denial.roast@learningcontainer.com'}, {'userId': 4, 'firstName': 'devid', 'lastName': 'neo', 'phoneNumber': '222222222', 'emailAddress': 'devid.neo@learningcontainer.com'}, {'userId': 5, 'firstName': 'jone', 'lastName': 'mac', 'phoneNumber': '111111111', 'emailAddress': 'jone.mac@learningcontainer.com'}]}\n</pre>\n\n\n\n## JSON to HTML\n\n_h and _zh are two functions for the convertion. _h is to create plain HTML table while _zh makes collapse/expand possible.\n\n<pre><font color=\"#00AFFF\">yonghang</font>@<font color=\"#FF8700\">mtp</font><font color=\"#00AFFF\">~</font> $ curl -s walkerever.com/share/test/json/s6.json | qic "_h"\n<<font color=\"#008700\"><b>tt</b></font>>\n<<font color=\"#008700\"><b>table</b></font> <font color=\"#878700\">style</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"border-collapse:collapse;;"</font> <font color=\"#878700\">border</font><font color=\"#626262\">=</font><font color=\"#AF0000\">1</font> >\n<<font color=\"#008700\"><b>tr</b></font> <font color=\"#878700\">class</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"child-MPzoqOdFrYXQpqJzvSpl"</font>>\n<<font color=\"#008700\"><b>td</b></font> <font color=\"#878700\">valign</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"top"</font>><<font color=\"#008700\"><b>b</b></font>>users</<font color=\"#008700\"><b>b</b></font>></<font color=\"#008700\"><b>td</b></font>>\n <<font color=\"#008700\"><b>td</b></font>>\n <<font color=\"#008700\"><b>table</b></font> <font color=\"#878700\">style</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"border-collapse:collapse;;"</font> <font color=\"#878700\">border</font><font color=\"#626262\">=</font><font color=\"#AF0000\">1</font> <font color=\"#878700\">width</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"100%"</font>>\n <<font color=\"#008700\"><b>tr</b></font> <font color=\"#878700\">class</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"child-WvkznPHasGyCxViXFeQH"</font> <font color=\"#878700\">style</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"background-color:#FFFFFF"</font>>\n <<font color=\"#008700\"><b>td</b></font> <font color=\"#878700\">valign</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"top"</font>><<font color=\"#008700\"><b>b</b></font>>userId</<font color=\"#008700\"><b>b</b></font>></<font color=\"#008700\"><b>td</b></font>>\n <<font color=\"#008700\"><b>td</b></font>>1</<font color=\"#008700\"><b>td</b></font>>\n </<font color=\"#008700\"><b>tr</b></font>>\n <<font color=\"#008700\"><b>tr</b></font> <font color=\"#878700\">class</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"child-WvkznPHasGyCxViXFeQH"</font> <font color=\"#878700\">style</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"background-color:#FFFFFF"</font>>\n <<font color=\"#008700\"><b>td</b></font> <font color=\"#878700\">valign</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"top"</font>><<font color=\"#008700\"><b>b</b></font>>firstName</<font color=\"#008700\"><b>b</b></font>></<font color=\"#008700\"><b>td</b></font>>\n <<font color=\"#008700\"><b>td</b></font>>Krish</<font color=\"#008700\"><b>td</b></font>>\n </<font color=\"#008700\"><b>tr</b></font>>\n <<font color=\"#008700\"><b>tr</b></font> <font color=\"#878700\">class</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"child-WvkznPHasGyCxViXFeQH"</font> <font color=\"#878700\">style</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"background-color:#FFFFFF"</font>>\n <<font color=\"#008700\"><b>td</b></font> <font color=\"#878700\">valign</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"top"</font>><<font color=\"#008700\"><b>b</b></font>>lastName</<font color=\"#008700\"><b>b</b></font>></<font color=\"#008700\"><b>td</b></font>>\n <<font color=\"#008700\"><b>td</b></font>>Lee</<font color=\"#008700\"><b>td</b></font>>\n </<font color=\"#008700\"><b>tr</b></font>>\n <<font color=\"#008700\"><b>tr</b></font> <font color=\"#878700\">class</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"child-WvkznPHasGyCxViXFeQH"</font> <font color=\"#878700\">style</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"background-color:#FFFFFF"</font>>\n <<font color=\"#008700\"><b>td</b></font> <font color=\"#878700\">valign</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"top"</font>><<font color=\"#008700\"><b>b</b></font>>phoneNumber</<font color=\"#008700\"><b>b</b></font>></<font color=\"#008700\"><b>td</b></font>>\n <<font color=\"#008700\"><b>td</b></font>>123456</<font color=\"#008700\"><b>td</b></font>>\n </<font color=\"#008700\"><b>tr</b></font>>\n <<font color=\"#008700\"><b>tr</b></font> <font color=\"#878700\">class</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"child-WvkznPHasGyCxViXFeQH"</font> <font color=\"#878700\">style</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"background-color:#FFFFFF"</font>>\n <<font color=\"#008700\"><b>td</b></font> <font color=\"#878700\">valign</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"top"</font>><<font color=\"#008700\"><b>b</b></font>>emailAddress</<font color=\"#008700\"><b>b</b></font>></<font color=\"#008700\"><b>td</b></font>>\n <<font color=\"#008700\"><b>td</b></font>>krish.lee@learningcontainer.com</<font color=\"#008700\"><b>td</b></font>>\n </<font color=\"#008700\"><b>tr</b></font>>\n <<font color=\"#008700\"><b>tr</b></font> <font color=\"#878700\">class</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"child-WvkznPHasGyCxViXFeQH"</font> <font color=\"#878700\">style</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"background-color:#F1F1F1"</font>>\n <<font color=\"#008700\"><b>td</b></font> <font color=\"#878700\">valign</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"top"</font>><<font color=\"#008700\"><b>b</b></font>>userId</<font color=\"#008700\"><b>b</b></font>></<font color=\"#008700\"><b>td</b></font>>\n <<font color=\"#008700\"><b>td</b></font>>2</<font color=\"#008700\"><b>td</b></font>>\n </<font color=\"#008700\"><b>tr</b></font>>\n <<font color=\"#008700\"><b>tr</b></font> <font color=\"#878700\">class</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"child-WvkznPHasGyCxViXFeQH"</font> <font color=\"#878700\">style</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"background-color:#F1F1F1"</font>>\n <<font color=\"#008700\"><b>td</b></font> <font color=\"#878700\">valign</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"top"</font>><<font color=\"#008700\"><b>b</b></font>>firstName</<font color=\"#008700\"><b>b</b></font>></<font color=\"#008700\"><b>td</b></font>>\n <<font color=\"#008700\"><b>td</b></font>>racks</<font color=\"#008700\"><b>td</b></font>>\n </<font color=\"#008700\"><b>tr</b></font>>\n <<font color=\"#008700\"><b>tr</b></font> <font color=\"#878700\">class</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"child-WvkznPHasGyCxViXFeQH"</font> <font color=\"#878700\">style</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"background-color:#F1F1F1"</font>>\n <<font color=\"#008700\"><b>td</b></font> <font color=\"#878700\">valign</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"top"</font>><<font color=\"#008700\"><b>b</b></font>>lastName</<font color=\"#008700\"><b>b</b></font>></<font color=\"#008700\"><b>td</b></font>>\n <<font color=\"#008700\"><b>td</b></font>>jacson</<font color=\"#008700\"><b>td</b></font>>\n </<font color=\"#008700\"><b>tr</b></font>>\n <<font color=\"#008700\"><b>tr</b></font> <font color=\"#878700\">class</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"child-WvkznPHasGyCxViXFeQH"</font> <font color=\"#878700\">style</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"background-color:#F1F1F1"</font>>\n <<font color=\"#008700\"><b>td</b></font> <font color=\"#878700\">valign</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"top"</font>><<font color=\"#008700\"><b>b</b></font>>phoneNumber</<font color=\"#008700\"><b>b</b></font>></<font color=\"#008700\"><b>td</b></font>>\n <<font color=\"#008700\"><b>td</b></font>>123456</<font color=\"#008700\"><b>td</b></font>>\n </<font color=\"#008700\"><b>tr</b></font>>\n <<font color=\"#008700\"><b>tr</b></font> <font color=\"#878700\">class</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"child-WvkznPHasGyCxViXFeQH"</font> <font color=\"#878700\">style</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"background-color:#F1F1F1"</font>>\n <<font color=\"#008700\"><b>td</b></font> <font color=\"#878700\">valign</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"top"</font>><<font color=\"#008700\"><b>b</b></font>>emailAddress</<font color=\"#008700\"><b>b</b></font>></<font color=\"#008700\"><b>td</b></font>>\n <<font color=\"#008700\"><b>td</b></font>>racks.jacson@learningcontainer.com</<font color=\"#008700\"><b>td</b></font>>\n </<font color=\"#008700\"><b>tr</b></font>>\n <<font color=\"#008700\"><b>tr</b></font> <font color=\"#878700\">class</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"child-WvkznPHasGyCxViXFeQH"</font> <font color=\"#878700\">style</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"background-color:#FFFFFF"</font>>\n <<font color=\"#008700\"><b>td</b></font> <font color=\"#878700\">valign</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"top"</font>><<font color=\"#008700\"><b>b</b></font>>userId</<font color=\"#008700\"><b>b</b></font>></<font color=\"#008700\"><b>td</b></font>>\n <<font color=\"#008700\"><b>td</b></font>>3</<font color=\"#008700\"><b>td</b></font>>\n </<font color=\"#008700\"><b>tr</b></font>>\n <<font color=\"#008700\"><b>tr</b></font> <font color=\"#878700\">class</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"child-WvkznPHasGyCxViXFeQH"</font> <font color=\"#878700\">style</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"background-color:#FFFFFF"</font>>\n <<font color=\"#008700\"><b>td</b></font> <font color=\"#878700\">valign</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"top"</font>><<font color=\"#008700\"><b>b</b></font>>firstName</<font color=\"#008700\"><b>b</b></font>></<font color=\"#008700\"><b>td</b></font>>\n <<font color=\"#008700\"><b>td</b></font>>denial</<font color=\"#008700\"><b>td</b></font>>\n </<font color=\"#008700\"><b>tr</b></font>>\n <<font color=\"#008700\"><b>tr</b></font> <font color=\"#878700\">class</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"child-WvkznPHasGyCxViXFeQH"</font> <font color=\"#878700\">style</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"background-color:#FFFFFF"</font>>\n <<font color=\"#008700\"><b>td</b></font> <font color=\"#878700\">valign</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"top"</font>><<font color=\"#008700\"><b>b</b></font>>lastName</<font color=\"#008700\"><b>b</b></font>></<font color=\"#008700\"><b>td</b></font>>\n <<font color=\"#008700\"><b>td</b></font>>roast</<font color=\"#008700\"><b>td</b></font>>\n </<font color=\"#008700\"><b>tr</b></font>>\n <<font color=\"#008700\"><b>tr</b></font> <font color=\"#878700\">class</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"child-WvkznPHasGyCxViXFeQH"</font> <font color=\"#878700\">style</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"background-color:#FFFFFF"</font>>\n <<font color=\"#008700\"><b>td</b></font> <font color=\"#878700\">valign</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"top"</font>><<font color=\"#008700\"><b>b</b></font>>phoneNumber</<font color=\"#008700\"><b>b</b></font>></<font color=\"#008700\"><b>td</b></font>>\n <<font color=\"#008700\"><b>td</b></font>>33333333</<font color=\"#008700\"><b>td</b></font>>\n </<font color=\"#008700\"><b>tr</b></font>>\n <<font color=\"#008700\"><b>tr</b></font> <font color=\"#878700\">class</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"child-WvkznPHasGyCxViXFeQH"</font> <font color=\"#878700\">style</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"background-color:#FFFFFF"</font>>\n <<font color=\"#008700\"><b>td</b></font> <font color=\"#878700\">valign</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"top"</font>><<font color=\"#008700\"><b>b</b></font>>emailAddress</<font color=\"#008700\"><b>b</b></font>></<font color=\"#008700\"><b>td</b></font>>\n <<font color=\"#008700\"><b>td</b></font>>denial.roast@learningcontainer.com</<font color=\"#008700\"><b>td</b></font>>\n </<font color=\"#008700\"><b>tr</b></font>>\n <<font color=\"#008700\"><b>tr</b></font> <font color=\"#878700\">class</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"child-WvkznPHasGyCxViXFeQH"</font> <font color=\"#878700\">style</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"background-color:#F1F1F1"</font>>\n <<font color=\"#008700\"><b>td</b></font> <font color=\"#878700\">valign</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"top"</font>><<font color=\"#008700\"><b>b</b></font>>userId</<font color=\"#008700\"><b>b</b></font>></<font color=\"#008700\"><b>td</b></font>>\n <<font color=\"#008700\"><b>td</b></font>>4</<font color=\"#008700\"><b>td</b></font>>\n </<font color=\"#008700\"><b>tr</b></font>>\n <<font color=\"#008700\"><b>tr</b></font> <font color=\"#878700\">class</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"child-WvkznPHasGyCxViXFeQH"</font> <font color=\"#878700\">style</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"background-color:#F1F1F1"</font>>\n <<font color=\"#008700\"><b>td</b></font> <font color=\"#878700\">valign</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"top"</font>><<font color=\"#008700\"><b>b</b></font>>firstName</<font color=\"#008700\"><b>b</b></font>></<font color=\"#008700\"><b>td</b></font>>\n <<font color=\"#008700\"><b>td</b></font>>devid</<font color=\"#008700\"><b>td</b></font>>\n </<font color=\"#008700\"><b>tr</b></font>>\n <<font color=\"#008700\"><b>tr</b></font> <font color=\"#878700\">class</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"child-WvkznPHasGyCxViXFeQH"</font> <font color=\"#878700\">style</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"background-color:#F1F1F1"</font>>\n <<font color=\"#008700\"><b>td</b></font> <font color=\"#878700\">valign</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"top"</font>><<font color=\"#008700\"><b>b</b></font>>lastName</<font color=\"#008700\"><b>b</b></font>></<font color=\"#008700\"><b>td</b></font>>\n <<font color=\"#008700\"><b>td</b></font>>neo</<font color=\"#008700\"><b>td</b></font>>\n </<font color=\"#008700\"><b>tr</b></font>>\n <<font color=\"#008700\"><b>tr</b></font> <font color=\"#878700\">class</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"child-WvkznPHasGyCxViXFeQH"</font> <font color=\"#878700\">style</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"background-color:#F1F1F1"</font>>\n <<font color=\"#008700\"><b>td</b></font> <font color=\"#878700\">valign</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"top"</font>><<font color=\"#008700\"><b>b</b></font>>phoneNumber</<font color=\"#008700\"><b>b</b></font>></<font color=\"#008700\"><b>td</b></font>>\n <<font color=\"#008700\"><b>td</b></font>>222222222</<font color=\"#008700\"><b>td</b></font>>\n </<font color=\"#008700\"><b>tr</b></font>>\n <<font color=\"#008700\"><b>tr</b></font> <font color=\"#878700\">class</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"child-WvkznPHasGyCxViXFeQH"</font> <font color=\"#878700\">style</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"background-color:#F1F1F1"</font>>\n <<font color=\"#008700\"><b>td</b></font> <font color=\"#878700\">valign</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"top"</font>><<font color=\"#008700\"><b>b</b></font>>emailAddress</<font color=\"#008700\"><b>b</b></font>></<font color=\"#008700\"><b>td</b></font>>\n <<font color=\"#008700\"><b>td</b></font>>devid.neo@learningcontainer.com</<font color=\"#008700\"><b>td</b></font>>\n </<font color=\"#008700\"><b>tr</b></font>>\n <<font color=\"#008700\"><b>tr</b></font> <font color=\"#878700\">class</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"child-WvkznPHasGyCxViXFeQH"</font> <font color=\"#878700\">style</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"background-color:#FFFFFF"</font>>\n <<font color=\"#008700\"><b>td</b></font> <font color=\"#878700\">valign</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"top"</font>><<font color=\"#008700\"><b>b</b></font>>userId</<font color=\"#008700\"><b>b</b></font>></<font color=\"#008700\"><b>td</b></font>>\n <<font color=\"#008700\"><b>td</b></font>>5</<font color=\"#008700\"><b>td</b></font>>\n </<font color=\"#008700\"><b>tr</b></font>>\n <<font color=\"#008700\"><b>tr</b></font> <font color=\"#878700\">class</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"child-WvkznPHasGyCxViXFeQH"</font> <font color=\"#878700\">style</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"background-color:#FFFFFF"</font>>\n <<font color=\"#008700\"><b>td</b></font> <font color=\"#878700\">valign</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"top"</font>><<font color=\"#008700\"><b>b</b></font>>firstName</<font color=\"#008700\"><b>b</b></font>></<font color=\"#008700\"><b>td</b></font>>\n <<font color=\"#008700\"><b>td</b></font>>jone</<font color=\"#008700\"><b>td</b></font>>\n </<font color=\"#008700\"><b>tr</b></font>>\n <<font color=\"#008700\"><b>tr</b></font> <font color=\"#878700\">class</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"child-WvkznPHasGyCxViXFeQH"</font> <font color=\"#878700\">style</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"background-color:#FFFFFF"</font>>\n <<font color=\"#008700\"><b>td</b></font> <font color=\"#878700\">valign</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"top"</font>><<font color=\"#008700\"><b>b</b></font>>lastName</<font color=\"#008700\"><b>b</b></font>></<font color=\"#008700\"><b>td</b></font>>\n <<font color=\"#008700\"><b>td</b></font>>mac</<font color=\"#008700\"><b>td</b></font>>\n </<font color=\"#008700\"><b>tr</b></font>>\n <<font color=\"#008700\"><b>tr</b></font> <font color=\"#878700\">class</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"child-WvkznPHasGyCxViXFeQH"</font> <font color=\"#878700\">style</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"background-color:#FFFFFF"</font>>\n <<font color=\"#008700\"><b>td</b></font> <font color=\"#878700\">valign</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"top"</font>><<font color=\"#008700\"><b>b</b></font>>phoneNumber</<font color=\"#008700\"><b>b</b></font>></<font color=\"#008700\"><b>td</b></font>>\n <<font color=\"#008700\"><b>td</b></font>>111111111</<font color=\"#008700\"><b>td</b></font>>\n </<font color=\"#008700\"><b>tr</b></font>>\n <<font color=\"#008700\"><b>tr</b></font> <font color=\"#878700\">class</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"child-WvkznPHasGyCxViXFeQH"</font> <font color=\"#878700\">style</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"background-color:#FFFFFF"</font>>\n <<font color=\"#008700\"><b>td</b></font> <font color=\"#878700\">valign</font><font color=\"#626262\">=</font><font color=\"#AF0000\">"top"</font>><<font color=\"#008700\"><b>b</b></font>>emailAddress</<font color=\"#008700\"><b>b</b></font>></<font color=\"#008700\"><b>td</b></font>>\n <<font color=\"#008700\"><b>td</b></font>>jone.mac@learningcontainer.com</<font color=\"#008700\"><b>td</b></font>>\n </<font color=\"#008700\"><b>tr</b></font>>\n </<font color=\"#008700\"><b>table</b></font>>\n\n </<font color=\"#008700\"><b>td</b></font>>\n</<font color=\"#008700\"><b>tr</b></font>>\n</<font color=\"#008700\"><b>table</b></font>>\n\n</pre>\n\n\n_h in HTML,\n\n\n<tt>\n<table style=\"border-collapse:collapse;;\" border=1 >\n<tr class=\"child-mBrQwESdaSJxRrLHiwHb\">\n<td valign=\"top\"><b>users</b></td>\n <td>\n <table style=\"border-collapse:collapse;;\" border=1 width=\"100%\">\n <tr class=\"child-xbZJaLZZyftMuMkOmsrF\" >\n <td valign=\"top\"><b>userId</b></td>\n <td>1</td>\n </tr>\n <tr class=\"child-xbZJaLZZyftMuMkOmsrF\" >\n <td valign=\"top\"><b>firstName</b></td>\n <td>Krish</td>\n </tr>\n <tr class=\"child-xbZJaLZZyftMuMkOmsrF\" >\n <td valign=\"top\"><b>lastName</b></td>\n <td>Lee</td>\n </tr>\n <tr class=\"child-xbZJaLZZyftMuMkOmsrF\" >\n <td valign=\"top\"><b>phoneNumber</b></td>\n <td>123456</td>\n </tr>\n <tr class=\"child-xbZJaLZZyftMuMkOmsrF\" >\n <td valign=\"top\"><b>emailAddress</b></td>\n <td>krish.lee@learningcontainer.com</td>\n </tr>\n <tr class=\"child-xbZJaLZZyftMuMkOmsrF\" >\n <td valign=\"top\"><b>userId</b></td>\n <td>2</td>\n </tr>\n <tr class=\"child-xbZJaLZZyftMuMkOmsrF\" >\n <td valign=\"top\"><b>firstName</b></td>\n <td>racks</td>\n </tr>\n <tr class=\"child-xbZJaLZZyftMuMkOmsrF\" >\n <td valign=\"top\"><b>lastName</b></td>\n <td>jacson</td>\n </tr>\n <tr class=\"child-xbZJaLZZyftMuMkOmsrF\" >\n <td valign=\"top\"><b>phoneNumber</b></td>\n <td>123456</td>\n </tr>\n <tr class=\"child-xbZJaLZZyftMuMkOmsrF\" >\n <td valign=\"top\"><b>emailAddress</b></td>\n <td>racks.jacson@learningcontainer.com</td>\n </tr>\n <tr class=\"child-xbZJaLZZyftMuMkOmsrF\" >\n <td valign=\"top\"><b>userId</b></td>\n <td>3</td>\n </tr>\n <tr class=\"child-xbZJaLZZyftMuMkOmsrF\" >\n <td valign=\"top\"><b>firstName</b></td>\n <td>denial</td>\n </tr>\n <tr class=\"child-xbZJaLZZyftMuMkOmsrF\" >\n <td valign=\"top\"><b>lastName</b></td>\n <td>roast</td>\n </tr>\n <tr class=\"child-xbZJaLZZyftMuMkOmsrF\" >\n <td valign=\"top\"><b>phoneNumber</b></td>\n <td>33333333</td>\n </tr>\n <tr class=\"child-xbZJaLZZyftMuMkOmsrF\" >\n <td valign=\"top\"><b>emailAddress</b></td>\n <td>denial.roast@learningcontainer.com</td>\n </tr>\n <tr class=\"child-xbZJaLZZyftMuMkOmsrF\" >\n <td valign=\"top\"><b>userId</b></td>\n <td>4</td>\n </tr>\n <tr class=\"child-xbZJaLZZyftMuMkOmsrF\" >\n <td valign=\"top\"><b>firstName</b></td>\n <td>devid</td>\n </tr>\n <tr class=\"child-xbZJaLZZyftMuMkOmsrF\" >\n <td valign=\"top\"><b>lastName</b></td>\n <td>neo</td>\n </tr>\n <tr class=\"child-xbZJaLZZyftMuMkOmsrF\" >\n <td valign=\"top\"><b>phoneNumber</b></td>\n <td>222222222</td>\n </tr>\n <tr class=\"child-xbZJaLZZyftMuMkOmsrF\" >\n <td valign=\"top\"><b>emailAddress</b></td>\n <td>devid.neo@learningcontainer.com</td>\n </tr>\n <tr class=\"child-xbZJaLZZyftMuMkOmsrF\" >\n <td valign=\"top\"><b>userId</b></td>\n <td>5</td>\n </tr>\n <tr class=\"child-xbZJaLZZyftMuMkOmsrF\" >\n <td valign=\"top\"><b>firstName</b></td>\n <td>jone</td>\n </tr>\n <tr class=\"child-xbZJaLZZyftMuMkOmsrF\" >\n <td valign=\"top\"><b>lastName</b></td>\n <td>mac</td>\n </tr>\n <tr class=\"child-xbZJaLZZyftMuMkOmsrF\" >\n <td valign=\"top\"><b>phoneNumber</b></td>\n <td>111111111</td>\n </tr>\n <tr class=\"child-xbZJaLZZyftMuMkOmsrF\" >\n <td valign=\"top\"><b>emailAddress</b></td>\n <td>jone.mac@learningcontainer.com</td>\n </tr>\n </table>\n\n </td>\n</tr>\n</table>\n\n\n\t\n_zh table,\n\t\n\t\n\n<header>\n<script src=\"https://code.jquery.com/jquery-3.6.0.min.js\"></script> \n<script type=\"text/javascript\"> \n $(document).ready(function () { \n $('tr.parent') .css(\"cursor\", \"pointer\") .attr(\"title\", \"Click to expand/collapse\") .click(function () { \n $(this).siblings('.child-' + this.id).toggle(); \n }); \n $('tr[@class^=child-]').hide().children('td'); \n }); \n</script>\n</header>\n\n<tt>\n<table style=\"border-collapse:collapse;;\" border=1 >\n<tr class=\"parent\" id=\"DLvJNVyrvwldSNCapYeW\" title=\"Click to expand/collapse\" style=\"cursor: pointer;\"> <td><b>D(1)</b></td> </tr>\n<tr class=\"child-DLvJNVyrvwldSNCapYeW\">\n<td valign=\"top\"><b>users</b></td>\n <td>\n <table style=\"border-collapse:collapse;;\" border=1 width=\"100%\">\n <tr class=\"parent\" id=\"ISMOWRxJylpBVUVUXmVJ\" title=\"Click to expand/collapse\" style=\"cursor: pointer;\"> <td><b>L(5)</b></td> </tr>\n <tr class=\"child-ISMOWRxJylpBVUVUXmVJ\" >\n <td valign=\"top\"><b>userId</b></td>\n <td>1</td>\n </tr>\n <tr class=\"child-ISMOWRxJylpBVUVUXmVJ\" >\n <td valign=\"top\"><b>firstName</b></td>\n <td>Krish</td>\n </tr>\n <tr class=\"child-ISMOWRxJylpBVUVUXmVJ\" >\n <td valign=\"top\"><b>lastName</b></td>\n <td>Lee</td>\n </tr>\n <tr class=\"child-ISMOWRxJylpBVUVUXmVJ\" >\n <td valign=\"top\"><b>phoneNumber</b></td>\n <td>123456</td>\n </tr>\n <tr class=\"child-ISMOWRxJylpBVUVUXmVJ\" >\n <td valign=\"top\"><b>emailAddress</b></td>\n <td>krish.lee@learningcontainer.com</td>\n </tr>\n <tr class=\"child-ISMOWRxJylpBVUVUXmVJ\" >\n <td valign=\"top\"><b>userId</b></td>\n <td>2</td>\n </tr>\n <tr class=\"child-ISMOWRxJylpBVUVUXmVJ\" >\n <td valign=\"top\"><b>firstName</b></td>\n <td>racks</td>\n </tr>\n <tr class=\"child-ISMOWRxJylpBVUVUXmVJ\" >\n <td valign=\"top\"><b>lastName</b></td>\n <td>jacson</td>\n </tr>\n <tr class=\"child-ISMOWRxJylpBVUVUXmVJ\" >\n <td valign=\"top\"><b>phoneNumber</b></td>\n <td>123456</td>\n </tr>\n <tr class=\"child-ISMOWRxJylpBVUVUXmVJ\" >\n <td valign=\"top\"><b>emailAddress</b></td>\n <td>racks.jacson@learningcontainer.com</td>\n </tr>\n <tr class=\"child-ISMOWRxJylpBVUVUXmVJ\" >\n <td valign=\"top\"><b>userId</b></td>\n <td>3</td>\n </tr>\n <tr class=\"child-ISMOWRxJylpBVUVUXmVJ\" >\n <td valign=\"top\"><b>firstName</b></td>\n <td>denial</td>\n </tr>\n <tr class=\"child-ISMOWRxJylpBVUVUXmVJ\" >\n <td valign=\"top\"><b>lastName</b></td>\n <td>roast</td>\n </tr>\n <tr class=\"child-ISMOWRxJylpBVUVUXmVJ\" >\n <td valign=\"top\"><b>phoneNumber</b></td>\n <td>33333333</td>\n </tr>\n <tr class=\"child-ISMOWRxJylpBVUVUXmVJ\" >\n <td valign=\"top\"><b>emailAddress</b></td>\n <td>denial.roast@learningcontainer.com</td>\n </tr>\n <tr class=\"child-ISMOWRxJylpBVUVUXmVJ\" >\n <td valign=\"top\"><b>userId</b></td>\n <td>4</td>\n </tr>\n <tr class=\"child-ISMOWRxJylpBVUVUXmVJ\" >\n <td valign=\"top\"><b>firstName</b></td>\n <td>devid</td>\n </tr>\n <tr class=\"child-ISMOWRxJylpBVUVUXmVJ\" >\n <td valign=\"top\"><b>lastName</b></td>\n <td>neo</td>\n </tr>\n <tr class=\"child-ISMOWRxJylpBVUVUXmVJ\" >\n <td valign=\"top\"><b>phoneNumber</b></td>\n <td>222222222</td>\n </tr>\n <tr class=\"child-ISMOWRxJylpBVUVUXmVJ\" >\n <td valign=\"top\"><b>emailAddress</b></td>\n <td>devid.neo@learningcontainer.com</td>\n </tr>\n <tr class=\"child-ISMOWRxJylpBVUVUXmVJ\" >\n <td valign=\"top\"><b>userId</b></td>\n <td>5</td>\n </tr>\n <tr class=\"child-ISMOWRxJylpBVUVUXmVJ\" >\n <td valign=\"top\"><b>firstName</b></td>\n <td>jone</td>\n </tr>\n <tr class=\"child-ISMOWRxJylpBVUVUXmVJ\" >\n <td valign=\"top\"><b>lastName</b></td>\n <td>mac</td>\n </tr>\n <tr class=\"child-ISMOWRxJylpBVUVUXmVJ\" >\n <td valign=\"top\"><b>phoneNumber</b></td>\n <td>111111111</td>\n </tr>\n <tr class=\"child-ISMOWRxJylpBVUVUXmVJ\" >\n <td valign=\"top\"><b>emailAddress</b></td>\n <td>jone.mac@learningcontainer.com</td>\n </tr>\n </table>\n\n </td>\n</tr>\n</table>\n\n\t\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\n... to be continued.\n\n",
"bugtrack_url": null,
"license": "Apache 2",
"summary": "data(JSON/XML/YAML) command line query tools with interactive mode.",
"version": "1.1.20",
"split_keywords": [
"json",
"yaml",
"xml",
"query",
"jq",
"dq",
"dsq",
"dsquery",
"qic",
"dataquery",
"json query",
"xml query",
"yaml query",
"jello",
"jq"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "3a04267215f8c1bb9c7facdf1c06a01f",
"sha256": "f6dd70e4da47a0956c1dd95e5e3e1dcce3c718a0108ed52f8d89f2f7873a821b"
},
"downloads": -1,
"filename": "qic-1.1.20.tar.gz",
"has_sig": false,
"md5_digest": "3a04267215f8c1bb9c7facdf1c06a01f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 31581,
"upload_time": "2022-12-26T03:05:27",
"upload_time_iso_8601": "2022-12-26T03:05:27.429403Z",
"url": "https://files.pythonhosted.org/packages/cb/2c/b4526b9ae1577bc44f09ded4be6c981954a943f16fdadc89689201c696ba/qic-1.1.20.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-26 03:05:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "laowangv5",
"github_project": "qic",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "qic"
}