有什么方法可以在单个命令中使用 jq 解析此 json 吗?我想做这样的事情:jq .key.first
。但是,是的,考虑到这key
是一个字符串,需要首先解析为 json。
{
"key": "{\"first\":\"123\",\"second\":\"456\"}"
}
Run Code Online (Sandbox Code Playgroud) 我正在尝试进行截屏视频,为此,我想每次都以相同的大小记录 VSCode 窗口。为此,我尝试使用 Automator 脚本来调整窗口大小。它适用于我测试过的所有应用程序,但不适用于 VSCode。
这是脚本:
(* This AppleScript will resize the current application window to the height specified below and center it in the screen. Compiled with code from Natanial Wools and Amit Agarwal *)
set the_application to (path to frontmost application as Unicode text)
set appHeight to 720
set appWidth to 1280
tell application "Finder"
set screenResolution to bounds of window of desktop
end tell
set screenWidth to item 3 of screenResolution
set screenHeight to item 4 …
Run Code Online (Sandbox Code Playgroud)