Jq: error (at <stdin>:1): Cannot index string with string “Labels”

Hi guys,
while collecting the running containers, i am getting this error

getRunningContainers() {
curl --no-buffer -s -XGET --unix-socket /tmp/docker.sock http:/containers/json | jq -r '.[] |
select(.Labels["filebeat.logging"] == "True") | .Id'
}

please help me!

Hi @siva1,

I'm not sure I follow, that doesn't look like an error, but a piece of code from a script.

Best regards

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