# Access nested fields in canvas markdown

**URL:** <https://discuss.elastic.co/t/access-nested-fields-in-canvas-markdown/371362>\
**Category:** Kibana\
**Created:** [December 3, 2024, 9:08am UTC](https://discuss.elastic.co/t/access-nested-fields-in-canvas-markdown/371362 "2024-12-03T09:08:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stephen\_IAnson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephen_ianson/32/137582_2.png) [@Stephen\_IAnson](https://discuss.elastic.co/u/Stephen_IAnson)\
**Post date:** [December 3, 2024, 9:08am UTC](https://discuss.elastic.co/t/access-nested-fields-in-canvas-markdown/371362/1 "2024-12-03T09:08:47Z")

</div>

Hi,

I'm able to use the text element on a canvas and use ES SQL to query to retrieve my document content.  
Basically I have a single 'health report' document from another source and I'd like to create a simple dashboard.  
I have 2 issues:

1. The SQL appears to be scoped inside \_source, so how can I retrieve the document ID? (I'd like to create a link to the document).
2. I can only access fields at the root of \_source in the markdown using syntax {{rows.[0].fieldname}}. When I want to access {{rows[0].some.nested.field}}, it never returns a value. Currently my workaround is to add in the select clause ",.some.nested.field as my\_alias" and then I can retrieve the value using {{rows[0].my\_alias}} but I'm guessing there's an easier way?

Thanks

Steve
