How to script to extract the value

Hi, I have following data and I want to extract the value where metadata.items.key equals environment__name.. How can I do that in elastic search and Kibana? thanks

          "metadata" : {
            "fingerprint" : "liLJhLhZtnk=",
            "items" : [
              {
                "key" : "sshAccessLdapGroups",
                "value" : "admins"
              },
              {
                "key" : "environment__id",
                "value" : "258a7e32-b32c-4844-96c7-d76b0fd5b009"
              },
              {
                "key" : "environment__name",
                "value" : "zzz00011"
              },
              {
                "key" : "environment__group",
                "value" : "admins"
              },
              {
                "key" : "environment__owner",
                "value" : "admin"
              },
              {
                "key" : "description",
                "value" : ""
              },
              {
                "key" : "task_id",
                "value" : "8003dbbc-26a6-4746-a6cc-e736ee91ea2f"
              }
            ],
            "kind" : "compute#metadata"
          }

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.