sample data
wine.jl
{
"color": "red",
"name": "Pinot Meunier"
}
{
"color": "red",
"name": "Pinot Noir"
}
{
"color": "red",
"name": "Merlot"
}
{
"color": "white",
"name": "Pinot Gris"
}
nameがPinotで始まるハッシュだけ表示する
$ cat wine.jl | jq '.[] | select(.name | startswith("Pinot"))'
{
"color": "red",
"name": "Pinot Meunier"
}
{
"color": "red",
"name": "Pinot Noir"
}
{
"color": "white",
"name": "Pinot Gris"
}