<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: HubL - query_dict - get keys and values in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/HubL-query-dict-get-keys-and-values/m-p/365464#M18339</link>
    <description>&lt;P&gt;Ahh yes, I missed the ".items()" part. Too used to other languages not having it!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
    <pubDate>Fri, 28 Aug 2020 08:54:09 GMT</pubDate>
    <dc:creator>dannio</dc:creator>
    <dc:date>2020-08-28T08:54:09Z</dc:date>
    <item>
      <title>HubL - query_dict - get keys and values</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubL-query-dict-get-keys-and-values/m-p/12511#M1228</link>
      <description>&lt;P&gt;hi all&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if i print the query_dict i would get this:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;{yr=2014, onoff=0}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;i would like to get the &lt;FONT color="#FF0000"&gt;keys&lt;/FONT&gt; as well as the values for further use but manage only to get the values. how could i read the key's?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1 | &lt;FONT color="#FF0000"&gt;yr&lt;/FONT&gt; | 2014&lt;BR /&gt;2 | &lt;FONT color="#FF0000"&gt;onoff&amp;nbsp;&lt;/FONT&gt;| 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;unfortunately this did not work:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;{% for &lt;FONT color="#FF0000"&gt;key&lt;/FONT&gt;, value in request.query_dict %}&lt;BR /&gt;&amp;nbsp; {{ loop.index }} | {{ &lt;FONT color="#FF0000"&gt;key&lt;/FONT&gt; }} | {{ value }}&amp;lt;br&amp;gt;&lt;BR /&gt;{% endfor %}&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 15:21:10 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubL-query-dict-get-keys-and-values/m-p/12511#M1228</guid>
      <dc:creator>diavolino</dc:creator>
      <dc:date>2017-04-19T15:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: HubL - query_dict - get keys and values</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubL-query-dict-get-keys-and-values/m-p/18191#M1755</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hey &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/2166"&gt;@diavolino&lt;/a&gt;&amp;nbsp;are you still having difficulty? Are you able to select deal stage before creating a new deal?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2017 15:59:00 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubL-query-dict-get-keys-and-values/m-p/18191#M1755</guid>
      <dc:creator>roisinkirby</dc:creator>
      <dc:date>2017-06-08T15:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: HubL - query_dict - get keys and values</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubL-query-dict-get-keys-and-values/m-p/363980#M18249</link>
      <description>&lt;P&gt;Can confirm, this only returns the values, not the keys&lt;/P&gt;</description>
      <pubDate>Mon, 24 Aug 2020 03:16:54 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubL-query-dict-get-keys-and-values/m-p/363980#M18249</guid>
      <dc:creator>dannio</dc:creator>
      <dc:date>2020-08-24T03:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: HubL - query_dict - get keys and values</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubL-query-dict-get-keys-and-values/m-p/364884#M18312</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/2166"&gt;@diavolino&lt;/a&gt;&amp;nbsp;I think you forgot the ".items()". Try this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% for key, value in request.query_dict.items() %}
  {{ loop.index }} | {{ key }} | {{ value }}&amp;lt;br&amp;gt;
{% endfor %}&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 26 Aug 2020 17:47:26 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubL-query-dict-get-keys-and-values/m-p/364884#M18312</guid>
      <dc:creator>stefen</dc:creator>
      <dc:date>2020-08-26T17:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: HubL - query_dict - get keys and values</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubL-query-dict-get-keys-and-values/m-p/365007#M18319</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/133"&gt;@stefen&lt;/a&gt;&amp;nbsp;, that worked. Is there no documentation on this anywhere? The only reference I found on the hubl documentation is for the general&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;request.query_dict&lt;/STRONG&gt;&lt;/EM&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;term.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 03:11:45 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubL-query-dict-get-keys-and-values/m-p/365007#M18319</guid>
      <dc:creator>dannio</dc:creator>
      <dc:date>2020-08-27T03:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: HubL - query_dict - get keys and values</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubL-query-dict-get-keys-and-values/m-p/365171#M18323</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/16537"&gt;@dannio&lt;/a&gt;&amp;nbsp;it's on the loops page here:&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/cms/hubl/for-loops#key-value-pairs-in-loops" target="_blank"&gt;https://developers.hubspot.com/docs/cms/hubl/for-loops#key-value-pairs-in-loops&lt;/A&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 12:51:56 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubL-query-dict-get-keys-and-values/m-p/365171#M18323</guid>
      <dc:creator>stefen</dc:creator>
      <dc:date>2020-08-27T12:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: HubL - query_dict - get keys and values</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubL-query-dict-get-keys-and-values/m-p/365464#M18339</link>
      <description>&lt;P&gt;Ahh yes, I missed the ".items()" part. Too used to other languages not having it!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Fri, 28 Aug 2020 08:54:09 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubL-query-dict-get-keys-and-values/m-p/365464#M18339</guid>
      <dc:creator>dannio</dc:creator>
      <dc:date>2020-08-28T08:54:09Z</dc:date>
    </item>
  </channel>
</rss>

