i try to put a bash script who'll get only the data value from the next request :
curl -H "X-Vault-Token: $VAULT_TOKEN" \
     -X GET http://127.0.0.1:8200/v1/secret/data/hello
but when i want to do | filter after :
curl -H "X-Vault-Token: $VAULT_TOKEN" \
     -X GET http://127.0.0.1:8200/v1/secret/data/hello | filter
It doesn't work.
I tried to switch to grep instead, but it didn't do what I expected.
I have the answer from my request :
{
  "request_id": "c1b3e19b-9f6b-a2af-1a1e-69b42bd9c81e",
  "lease_id": "",
  "renewable": false,
  "lease_duration": 0,
  "data": {
    "data": {
      "foo": "world"
    },
    "metadata": {
      "created_time": "2021-04-25T13:08:13.778097752Z",
      "deletion_time": "",
      "destroyed": false,
      "version": 1
    }
  },
  "wrap_info": null,
  "warnings": null,
  "auth": null
}
And i only want the field data, is anyone have encountered this ?
 
    