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

**URL:** <https://discuss.elastic.co/t/jq-error-at-stdin-1-cannot-index-string-with-string-labels/129655>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [April 26, 2018, 12:00pm UTC](https://discuss.elastic.co/t/jq-error-at-stdin-1-cannot-index-string-with-string-labels/129655 "2018-04-26T12:00:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![siva1](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@siva1](https://discuss.elastic.co/u/siva1)\
**Post date:** [April 26, 2018, 12:00pm UTC](https://discuss.elastic.co/t/jq-error-at-stdin-1-cannot-index-string-with-string-labels/129655/1 "2018-04-26T12:00:46Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)\
**Post date:** [April 26, 2018, 12:45pm UTC](https://discuss.elastic.co/t/jq-error-at-stdin-1-cannot-index-string-with-string-labels/129655/2 "2018-04-26T12:45:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 24, 2018, 12:45pm UTC](https://discuss.elastic.co/t/jq-error-at-stdin-1-cannot-index-string-with-string-labels/129655/3 "2018-05-24T12:45:17Z")

</div>

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