Resource details · Practical tools
jq: Pick the information you need from JSON
Use a fictional task list in the official playground to learn one JSON filter.
Titles, introductions and guides are translated. Copyable resources, examples and licences retain their original language. Code is displayed only; this page does not execute it or call AI.
Resource details
For beginners encountering API responses, configuration files, or structured records. Understand a small filter before processing files locally.
Before you start
- Platforms
- Cross-platform
- Content updated
- The first exercise needs a browser and fictional JSON; no compiler or local installation is needed.
- For private files, use an official local release matching your system and architecture. Check the executable name and path on Windows.
Enter the filter in the official playground, not as a PowerShell command. The command-line version requires quoting appropriate to the shell you use.
Common pitfalls
- JSON keys and strings require double quotes. The sample true value is a Boolean, not a quoted string.
- Do not paste access tokens, customer records, or private configuration into an online playground or shared link. Check the service documentation for processing and saving behavior.
- Keep originals before batch processing, and do not redirect output over the input file. Check precision separately for large JSON numbers.
- The main-code MIT license does not cover docs/ documentation under CC BY 3.0 or replace the component and website-dependency terms listed in COPYING.
Complete resource
[Small goal] Find completed names in two JSON records and explain why changing the condition changes the output. [Before you start] The first exercise needs a browser and fictional JSON; no compiler or local installation is needed. For private files, use an official local release matching your system and architecture. Check the executable name and path on Windows. [Three steps] 1. Open the official playground: Visit play.jqlang.org and identify the JSON input, filter, and output areas. Use invented data only. 2. Add two practice records: Enter [{"name":"Xiaobu","done":true},{"name":"Aqing","done":false}] in the JSON input. Check the brackets, commas, and double quotes. 3. Filter and change one value: Enter .[] | select(.done == true) | .name as the filter. Expect only "Xiaobu". Change the second done value to true and explain the extra result. [Check the result] The original sample produces the JSON string "Xiaobu"; completing the second record produces both names. [Sources and license] Official repository jqlang/jq; fixed commit 34f7186b86743a083a589741b6cea95293524108, dated 2026-06-20 (UTC). This is an established practical project reviewed on 2026-10-27, not an entry claimed from this round of live Trending observations. The main jq code uses MIT. This entry retains the complete COPYING without removing its other notices. COPYING separately assigns docs/ documentation to CC BY 3.0 and lists terms for components including dtoa.c, decNumber, Heimdal, and NetBSD, plus documentation-site dependencies. The main MIT license does not replace those terms. This original guide does not copy the documentation site or distribute a binary. This site provides an original guide and official links under CC BY 4.0. It does not bundle upstream source, installers, icons, models, or user content. A project license does not automatically cover dependencies, trademarks, model services, or hosting platforms; review any actual distribution separately. On 2026-10-27, the site reviewed official materials at a fixed commit, the complete license, and applicable notices to write this exercise. The upstream project was not installed, signed into, or run, and no security audit was performed. The expected result is a goal for you to check, not a record of a device test by this site.
Original guide (Chinese)
【小目标】从两条 JSON 记录中找出已完成的姓名,并解释条件变化为何改变输出。
【开始前准备】在线第一练习只需现代浏览器与虚构 JSON,不需要先安装编译工具。
需要本机处理文件时,从官方 releases 选择对应操作系统/架构的程序;Windows 的程序名与路径要核对。
【三步尝试】1. 打开官方练习页:访问 play.jqlang.org,清楚区分输入 JSON、筛选表达式与输出区域。只放虚构内容。
2. 准备两条虚构数据:在 JSON 输入区填入 [{"name":"Xiaobu","done":true},{"name":"Aqing","done":false}]。确认括号、逗号和双引号成对。
3. 筛选并改变一个条件:输入 .[] | select(.done == true) | .name,预期只输出 "Xiaobu"。再把第二条 done 改为 true,观察为什么会多出一个结果。
【检查结果】初始数据对应的输出是 JSON 字符串 "Xiaobu";修改第二条状态后应看到两个姓名。
【来源与许可】官方仓库 jqlang/jq;固定提交 34f7186b86743a083a589741b6cea95293524108,提交日期 2026-06-20(UTC)。2026-10-27 复核的稳定实用项目,不作为本轮实时热榜项目宣称。
jq 主代码为 MIT;本条保留完整 COPYING,不裁去其中的其他声明。COPYING 另将 docs/ 文档列为 CC BY 3.0,并列明 dtoa.c、decNumber、Heimdal、NetBSD 等组件条款与文档站依赖;主 MIT 不覆盖这些内容。本条为原创导览,不复制文档站或分发二进制。
本站只提供原创导览和官方入口,导览按 CC BY 4.0 分享;不捆绑上游源码、安装包、图标、模型或用户素材。项目许可不自动覆盖依赖、商标、模型服务或托管平台,具体分发产物须另行核对。
2026-10-27 已只读核对官方固定提交的资料、完整许可和适用声明,按资料编写这份练习;本站未安装、登录或运行上游项目,也未进行安全审计。预期结果是供你自行核对的目标,不是本站实机测试记录。How to use it
Find completed names in two JSON records and explain why changing the condition changes the output.
Open the official playground
Visit play.jqlang.org and identify the JSON input, filter, and output areas. Use invented data only.
Add two practice records
Enter [{"name":"Xiaobu","done":true},{"name":"Aqing","done":false}] in the JSON input. Check the brackets, commas, and double quotes.
Filter and change one value
Enter .[] | select(.done == true) | .name as the filter. Expect only "Xiaobu". Change the second done value to true and explain the extra result.
Expected output
The original sample produces the JSON string "Xiaobu"; completing the second record produces both names.
On 2026-10-27, the site reviewed official materials at a fixed commit, the complete license, and applicable notices to write this exercise. The upstream project was not installed, signed into, or run, and no security audit was performed. The expected result is a goal for you to check, not a record of a device test by this site.
Suitable uses
- For beginners encountering API responses, configuration files, or structured records. Understand a small filter before processing files locally.
Before using it
- The main jq code uses MIT. This entry retains the complete COPYING without removing its other notices. COPYING separately assigns docs/ documentation to CC BY 3.0 and lists terms for components including dtoa.c, decNumber, Heimdal, and NetBSD, plus documentation-site dependencies. The main MIT license does not replace those terms. This original guide does not copy the documentation site or distribute a binary.
- JSON keys and strings require double quotes. The sample true value is a Boolean, not a quoted string.
- Do not paste access tokens, customer records, or private configuration into an online playground or shared link. Check the service documentation for processing and saving behavior.
- Keep originals before batch processing, and do not redirect output over the input file. Check precision separately for large JSON numbers.
- The main-code MIT license does not cover docs/ documentation under CC BY 3.0 or replace the component and website-dependency terms listed in COPYING.
Authors and sources
- Attribution
- Site guide
- Upstream author
- Stephen Dolan and jq contributors; main-code copyright in COPYING: jq is copyright (C) 2012 Stephen Dolan
- Source repository
- https://github.com/jqlang/jq
- Source revision
34f7186b86743a083a589741b6cea95293524108- Licence checked
- 2026-10-27
Notices and modifications
Official repository jqlang/jq; fixed commit 34f7186b86743a083a589741b6cea95293524108, dated 2026-06-20 (UTC). This is an established practical project reviewed on 2026-10-27, not an entry claimed from this round of live Trending observations.
Complete licence
CC BY 4.0
CC BY 4.0 · Read the complete licence ↗
Upstream licence · MIT
jq is copyright (C) 2012 Stephen Dolan
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
jq's documentation (everything found under the docs/ subdirectory in
the source tree) is licensed under the Creative Commons CC BY 3.0
license, which can be found at:
https://creativecommons.org/licenses/by/3.0/
The documentation website includes a copy of Twitter's Bootstrap and
relies on Bonsai, Liquid templates and various other projects, look
them up for detailed licensing conditions.
jq incorporates David M. Gay's dtoa.c and g_fmt.c, which bear the
following notices:
dtoa.c:
The author of this software is David M. Gay.
Copyright (c) 1991, 2000, 2001 by Lucent Technologies.
Permission to use, copy, modify, and distribute this software for any
purpose without fee is hereby granted, provided that this entire notice
is included in all copies of any software which is or includes a copy
or modification of this software and in all copies of the supporting
documentation for such software.
THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY
REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
g_fmt.c:
The author of this software is David M. Gay.
Copyright (c) 1991, 1996 by Lucent Technologies.
Permission to use, copy, modify, and distribute this software for any
purpose without fee is hereby granted, provided that this entire notice
is included in all copies of any software which is or includes a copy
or modification of this software and in all copies of the supporting
documentation for such software.
THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY
REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
jq uses parts of the open source C library "decNumber", which is distributed
under the following license:
ICU License - ICU 1.8.1 and later
COPYRIGHT AND PERMISSION NOTICE
Copyright (c) 1995-2005 International Business Machines Corporation and others
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, and/or sell copies of the Software, and to permit persons
to whom the Software is furnished to do so, provided that the above
copyright notice(s) and this permission notice appear in all copies of
the Software and that both the above copyright notice(s) and this
permission notice appear in supporting documentation.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Except as contained in this notice, the name of a copyright holder
shall not be used in advertising or otherwise to promote the sale, use
or other dealings in this Software without prior written authorization
of the copyright holder.
--------------------------------------------------------------------------------
All trademarks and registered trademarks mentioned herein are the property of their respective owners.
jv_thread.h is copied from Heimdal's lib/base/heimbase.h and some code
in jv.c is copied from Heimdal's lib/base/dll.c:
Portions Copyright (c) 2016 Kungliga Tekniska Högskolan
(Royal Institute of Technology, Stockholm, Sweden).
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
jq uses a modified version of NetBSD implementation strptime(),
which is distributed under the following license:
Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc.
All rights reserved.
This code was contributed to The NetBSD Foundation by Klaus Klein.
Heavily optimised by David Laight
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Verification scope
Documentation and license reviewed
Project documentation and license records reviewed only; upstream software was not installed, run or security-audited.
2026-10-27