並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 21 件 / 21件

新着順 人気順

JMESPathの検索結果1 - 21 件 / 21件

  • JMESPath — JMESPath

    { "locations": [ {"name": "Seattle", "state": "WA"}, {"name": "New York", "state": "NY"}, {"name": "Bellevue", "state": "WA"}, {"name": "Olympia", "state": "WA"} ] } Result Try it Out! Enter an expression in the search box to see JMESPath in action. The expression is evaluated against the JSON data and the result is shown in the result pane. To learn more about JMESPath, check out the JMESPath Tut

    • JMESPath チュートリアル | DevelopersIO

      渡辺です。 AWSCLIのqueryオプションで利用できるJMESPathですが、導入部分の敷居は低いのですが、使いこなそうとするとなかなか難解な仕様な気がします。 そこで、複雑なqueryも書けるように、チュートリアルを紹介します。 JMESPathとは JMESPathはJSONのクエリ言語です。 ひらたく言えば、JMESPathを利用することで、JSONを対象としてフィルターや抽出を行い結果を取得できます。 jqが近いツールですが、jqはコマンド(ツール)であり、JMESPathはクエリ言語という点が相違点です。 JMESPathは、AWS CLI (v1.2以降)で利用できるため、結果となるJSONオブジェクトを加工するのに便利です(AWS CLIのフィルターとクエリーの使い方についてまとめてみた)。 基本書式 最もシンプルな書式は identifier(識別子)です。 JSONオ

        JMESPath チュートリアル | DevelopersIO
      • JMESPath Tutorial — JMESPath

        JMESPath Tutorial¶ This is a tutorial of the JMESPath language. JMESPath is a query language for JSON. You can extract and transform elements from a JSON document. The examples below are interactive. You can change the JMESPath expressions and see the results update automatically. For each of these examples, the JMESPath expression is applied to the input JSON on the left, and the result of evalut

        • AWS CLIのqueryオプション(JMESPath)で雑にgrepする方法 | DevelopersIO

          西澤です。ブログがずいぶんご無沙汰になってしまったので、リハビリを兼ねてちょっとした小ネタを書きます。みんな大好きAWS CLIで、雑に出力する対象をフィルタリングしたい時に、少し便利な方法を見つけたのでご紹介してみます。 JMESPathとは? AWS CLIのqueryオプションで利用することができるjsonをクエリする言語のことです。詳しくは、下記リンクをご覧ください。 JMESPath | Developers.IO JMESPath — JMESPath JMESPathで普通にフィルタする方法 AWS CLIで出力する対象を絞って表示したい場合、よく使われる方法として以下のようなものがあります。 完全一致でフィルタする この記事を読もうというモチベーションがある方は、これはご存知なのではないかと思います。 [?【キー名】==\`【検索文字】\`] $ aws ec2 descr

            AWS CLIのqueryオプション(JMESPath)で雑にgrepする方法 | DevelopersIO
          • 【個人メモ】JSONのパースにjmespathを使ってみよう - Qiita

            JSONのパースには、jqというツールが有名である。 が、昨日、aws-cliにて、--query オプションにより jmespath形式でのJSONパースを利用できる、ということで jmespathそのものを試してみることにした。 jmespathをインストール pipでインストールできる。

              【個人メモ】JSONのパースにjmespathを使ってみよう - Qiita
            • jq と JMESPath を同時に覚える | TECHSCORE BLOG | TECHSCORE BLOG

              はじめに ご無沙汰しております。田中です。今回は jq と JMESpath について書きます。 AWS CLI の返り値の JSON は、以下のように --query オプションに JMESPath を指定して処理できます。 # 名前が test- で始まる最新の AMI の id を取得 $ aws ec2 describe-images \ --filters Name=state,Values=available Name=is-public,Values=false \ --query "Images[?starts_with(Name, 'test-')] | sort_by(@, &CreationDate) | reverse(@)[0].ImageId" "ami-xxxxxxxxxxxxxxxxx"

              • GitHub - jmespath/jmespath.terminal: JMESPath exploration tool in the terminal

                You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                  GitHub - jmespath/jmespath.terminal: JMESPath exploration tool in the terminal
                • GitHub - jmespath/jp: Command line interface to JMESPath - http://jmespath.org

                  You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                    GitHub - jmespath/jp: Command line interface to JMESPath - http://jmespath.org
                  • JAWS-UG CLI専門支部でJMESPathについてLTしてきました | DevelopersIO

                    西澤です。昨日のJAWS-UG CLI専門支部にてJMESPathについて思いつきでLTしてみました。jsonの文字列操作はjqを使われている方が多いとは思うのですが、少しでもJMESPathに興味を持ってもらえれば、とお話させていただく時間をいただきました。 Python版AWS CLI 1.3の強化されたqueryオプションを使いこなすスニペット4つ | Developers.IO JMESPath — JMESPath JMESPath — JMESPath 0.7.1 documentation 発表資料 やっつけで作成した資料で恥ずかしいのですが、発表で使用した資料はこちらです。 発表内容 資料では、JMESPathを使ってどんな表現が可能なのかを実例ベースでお話しました。組み込み関数を利用すれば、AND条件やソート、joinによるCSV出力もできるという例をご紹介しました。必ず

                      JAWS-UG CLI専門支部でJMESPathについてLTしてきました | DevelopersIO
                    • GitHub - jmespath/jmespath.py: JMESPath is a query language for JSON.

                      You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                        GitHub - jmespath/jmespath.py: JMESPath is a query language for JSON.
                      • JMESPathのターミナル探索ツール「jmespath.terminal」 | DevelopersIO

                        小ネタです。 最近弊社でも関連エントリが増えて来たJSONパースツール「JMESPath」ですが、昨晩SNSでこのツールをより便利に扱う事の出来るツールが紹介されていたので早速触ってみる事にしました。それがこの「jmespath.terminal」です。 jmespath/jmespath.terminal: JMESPath exploration tool in the terminal インストールは至ってシンプル。pipで以下の様に関連ライブラリを導入するだけです。(※今回はAmazon Linux EC2を使って試してみました) $ sudo pip install jmespath-terminal You are using pip version 6.1.1, however version 8.1.2 is available. You should consider u

                          JMESPathのターミナル探索ツール「jmespath.terminal」 | DevelopersIO
                        • JMESPath Tutorial と jp コマンドを使って JMESPath を学ぶ - kakakakakku blog

                          JSON をパース(集計/整形など)するときに,よく使われているのは「jq」だと思う.僕も jq をよく使っている(構文は毎回調べるけど).今回は jq 以外の選択肢となる「JMESPath」の理解を深めることにした.JMESPath も JSON をパースできるクエリ言語(仕様)で,例えば AWS CLI の --query オプションでも採用されている. jmespath.org JMESPath Tutorial JMESPath をすぐに試すなら「JMESPath Tutorial」を使うと便利. jmespath.org よく使う構文を画面上で試すことができるし,実際にクエリを更新するとすぐに反映される.JMESPath Tutorial で試せる構文は以下となる. Basic Expressions Slicing Projections List and Slice Proj

                            JMESPath Tutorial と jp コマンドを使って JMESPath を学ぶ - kakakakakku blog
                          • 【小ネタ】AWS CLIのサンプルJSON出力オプションで上手にJMESPathしよう | DevelopersIO

                            西澤です。みんな大好きAWS CLIに、知っておくとちょっと便利なオプションが追加されていたので、ご紹介します。 サンプルJSON出力オプションとは? 下記リリースにある通り、バージョンは1.11.23以上である必要がありますので、まずAWS CLIのバージョンを確認しておきましょう。 1.11.23 feature:--generate-cli-skeleton output: Add support for generating sample output for command aws-cli/CHANGELOG.rst at develop · aws/aws-cli $ aws --version aws-cli/1.11.26 Python/2.7.10 Darwin/15.6.0 botocore/1.4.83 --generate-cli-skeletonオプションを使った

                              【小ネタ】AWS CLIのサンプルJSON出力オプションで上手にJMESPathしよう | DevelopersIO
                            • JMESPath チュートリアルでプロジェクションを理解する | DevelopersIO

                              渡辺です。 前回に引き続き、AWSCLIのqueryオプションで利用できるJMESPathのチュートリアルを紹介します。 今回のチュートリアルを終わらせると、かなり細かい抽出まで可能になるのでしょう。 プロジェクション(投射) プロジェクション(投射)は、JMESPathのキーとなる機能のひとつです。 イメージしずらいですが、要素をイイ感じにArrayに変換していくことができます。 リストのプロジェクション ワイルドカードを使った[*]はJSONのArrayに投射します。 [ {"first": "James", "last": "d"}, {"first": "Jacob", "last": "e"}, {"missing": "different"}, null ] JMESPath Result

                                JMESPath チュートリアルでプロジェクションを理解する | DevelopersIO
                              • jsonの戻り値とか、複雑なオブジェクトからスマートにデータを抽出[JMESPath 最強説] - 続 カッコの付け方

                                「パイセン、JSONで帰ってくる複雑な構造のオブジェクトをいい感じにするやつしらないっすか?」 「ああ、複雑な構造ね。しらん、専用の関数用意するとか?」 「やっぱ、そっすよねー」 全国津々浦々でこんな会話が繰り広げられてると思います。私も2回ぐらいこのやり取りをしました。この長年の問題に終止符、JMESPath最強じゃね? JMESPathとは 以前、一回書いてます iga-ninja.hatenablog.com この時私は勘違いしておりました、JMESPathはJSONだけを捌くライブラリではなく、JSONから素直にコンバート出来る各言語のオブジェクト を捌くことが出来ます。pythonで言うなら list と dictで出来てるものなら JMESPathでクエリ出来ます。# setとかは知りません。 似たようなのに jq コマンドがありますが、JMESPathのほうがいいです、多分。

                                  jsonの戻り値とか、複雑なオブジェクトからスマートにデータを抽出[JMESPath 最強説] - 続 カッコの付け方
                                • AWS CLI出力結果をJMESPathでできるだけ見やすくする | DevelopersIO

                                  西澤です。みんな大好きAWS CLIでは、--queryオプション(JMESPath)を利用して、様々な出力制御を行うことができます。どこまでAWS CLIでやるべきか、という議論は一旦置いておいて、今回試してみたことの一部を簡単にご紹介したいと思います。 JMESPath関連の記事も充実して来ているので、ぜひ他の記事も合わせてご覧ください。 JMESPath チュートリアル | Developers.IO JMESPath チュートリアルでプロジェクションを理解する | Developers.IO JMESPathのターミナル探索ツール「jmespath.terminal」 | Developers.IO AWS CLIの出力結果を見やすくする(基本編) そのままjsonで出力 まずはそのままjsonで出力します。これを順番に整形していきます。 $ aws ec2 describe-av

                                    AWS CLI出力結果をJMESPathでできるだけ見やすくする | DevelopersIO
                                  • JMESPath Specification — JMESPath

                                    The result of applying a JMESPath expression against a JSON document will always result in valid JSON, provided there are no errors during the evaluation process. Structured data in, structured data out. This also means that, with the exception of JMESPath expression types, JMESPath only supports the same types supported by JSON: number (integers and double-precision floating-point format in JSON)

                                    • aws-cli で使える –query = jmespath をガッツリ使い込む | iret.media

                                      こんにちは、cloudpack の 今岡 です。 すでに結構色んな所で取り上げられている aws-cli の --query ですが、使ってみました。 とりあえずこれ試してみよう! JMESPath Tutorial — JMESPath これを紹介だけで、このエントリの90%の価値が含まれております。騙されたと思ってやってみて。ぜひ 能書き xpathってご存知?要は、xmlに対するクエリ言語のようなもので、xmlの構成に合わせてxpathを指定することにより、狙った特定の要素だけを引っ張り出したり、加工したりできます。最近の人はxmlは嫌いらしいですが、まあ、json も xmlの冗長部分を削いだものなので同じことがjsonに対してもできるってことですね。これが jmespath のはず、名前の付け方からして。ちなみに私はxpathで一発クエリで超複雑なxmlから、特定要素をスコンと狙

                                        aws-cli で使える –query = jmespath をガッツリ使い込む | iret.media
                                      • 【小ネタ】AWS CLIのqueryオプション(JMESPath)でstringな数値をfilterしたい | DevelopersIO

                                        西澤です。だいぶ小ネタですが、備忘録です。やりたいことは件名の通りですが、正解にたどり着くまでの過程も残しておこうと思います。 AWS CLIでやりたかったこと SSMについて調査をする為に、下記のようなコマンドで下調べをしていました。 $ aws ssm list-documents \ --query "DocumentIdentifiers[?Owner==\`Amazon\`].[Name,SchemaVersion]" \ --max-results 25 \ --output text AWS-ApplyPatchBaseline 1.2 AWS-ConfigureAWSPackage 2.0 AWS-ConfigureCloudWatch 1.2 AWS-ConfigureDocker 2.0 AWS-ConfigureWindowsUpdate 1.2 AWS-FindWi

                                          【小ネタ】AWS CLIのqueryオプション(JMESPath)でstringな数値をfilterしたい | DevelopersIO
                                        • Advanced AWS CLI JMESPath Query Tricks - OpenSource Connections

                                          JMESPath Query in the AWS CLI At OSC we empower the world’s best search teams – if you have a search engine project using Apache Solr or Elasticsearch and you’d like our help tuning relevance or performance, get in touch! Here’s a great blog from 2015 about AWS CLI tricks and tips. Introduction The Amazon Command Line Interface (AWS CLI) is a great tool for exploring and querying your Amazon Web S

                                            Advanced AWS CLI JMESPath Query Tricks - OpenSource Connections
                                          • JMESPath Specification — JMESPath 0.7.1 documentation

                                            expression = sub-expression / index-expression / or-expression / identifier expression =/ "*" / multi-select-list / multi-select-hash / literal expression =/ function-expression / pipe-expression sub-expression = expression "." ( identifier / multi-select-list / multi-select-hash / function-expression / "*" ) or-expression = expression "||" expression pipe-expression = expression "|" expression in

                                            1