# how do we fetch a table from a dictionary in virtual query

**URL:** <https://forum.kx.com/t/how-do-we-fetch-a-table-from-a-dictionary-in-virtual-query/12738>\
**Category:** Community Support\
**Tags:** add-ons\
**Created:** [December 6, 2022, 5:23am UTC](https://forum.kx.com/t/how-do-we-fetch-a-table-from-a-dictionary-in-virtual-query/12738 "2022-12-06T05:23:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebymathew1](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@sebymathew1](https://forum.kx.com/u/sebymathew1)\
**Post date:** [December 6, 2022, 5:23am UTC](https://forum.kx.com/t/how-do-we-fetch-a-table-from-a-dictionary-in-virtual-query/12738/1 "2022-12-06T05:23:00Z")

</div>

I have no experience in JS scripts ,I have a case where my Data source is returning a dictionary of tables ,because I need to work on the same set of data with slight adjustments and the data set is very large. So I am returning something like below in my data Source.

table1:( xx:`a`b`c; yy:(1;2;3))

table2:( xx:`a`b`c; zz:(2022;2023;2024))

`table1`table2:(table1;table2)

Now in my one datagrid using virtual query I want to display data of table1 and in the other one the data of table2. For this I need my virtual query to display data of only one key of the dictionary

---

<div class="post-metadata">

**Author:** ![LeahS1](https://avatars.discourse-cdn.com/v4/letter/l/3da27b/32.png) [@LeahS1](https://forum.kx.com/u/LeahS1)\
**Post date:** [December 8, 2022, 5:54pm UTC](https://forum.kx.com/t/how-do-we-fetch-a-table-from-a-dictionary-in-virtual-query/12738/2 "2022-12-08T17:54:00Z")

</div>

Interesting here @sebymathew, we welcome feedback from fellow community contributors on this one!&nbsp;

Thanks for sharing
