1

I have the following response using kint. How can I correctly get the value of the title.

I tried stream.node_title[0]['#context'].output but getting null result.

enter image description here

1

Looks like it should be

{{ stream.node_title[0][0]['#context'].output }}

You can get the other two with

{{ stream.node_title[0][1]['#context'].output }}
{{ stream.node_title[0][2]['#context'].output }}

But obviously this would be hard coded. To make all of this dynamic, you can loop.

{% for title in stream.node_title[0] %}
    {{ title['#context'].output }}
{% endfor %}
  • thank you for your quick response @No Sssweat. Will try that now. – John Rey Tanquinco Jun 7 '18 at 5:20
  • 1
    wow perfect! I think the reason why there's an additional [0], its because theres an array. Thank you very much! – John Rey Tanquinco Jun 7 '18 at 5:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.