<?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 Python dictionary to list in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/python-dictionary-to-list/m-p/5451344#M7984</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;this is more basic python, but I stuck with this problem:&lt;/P&gt;&lt;P&gt;When I get the data of an ssid, the response is always a dictionary ('name' : 'something, ' number' : 22...) from Meraki which is fine.&lt;/P&gt;&lt;P&gt;But if I want to update the ssid, it has to be done in a form of name = 'something, number = '22'...&lt;/P&gt;&lt;P&gt;How do you convert this? &lt;/P&gt;&lt;P&gt;I don't want to hard code the config, I just want to change one of the values.&lt;/P&gt;&lt;P&gt;Thanks and best&lt;/P&gt;&lt;P&gt;Fabian&lt;/P&gt;</description>
    <pubDate>Mon, 31 May 2021 14:07:33 GMT</pubDate>
    <dc:creator>Fabian11</dc:creator>
    <dc:date>2021-05-31T14:07:33Z</dc:date>
    <item>
      <title>Python dictionary to list</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-dictionary-to-list/m-p/5451344#M7984</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;this is more basic python, but I stuck with this problem:&lt;/P&gt;&lt;P&gt;When I get the data of an ssid, the response is always a dictionary ('name' : 'something, ' number' : 22...) from Meraki which is fine.&lt;/P&gt;&lt;P&gt;But if I want to update the ssid, it has to be done in a form of name = 'something, number = '22'...&lt;/P&gt;&lt;P&gt;How do you convert this? &lt;/P&gt;&lt;P&gt;I don't want to hard code the config, I just want to change one of the values.&lt;/P&gt;&lt;P&gt;Thanks and best&lt;/P&gt;&lt;P&gt;Fabian&lt;/P&gt;</description>
      <pubDate>Mon, 31 May 2021 14:07:33 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-dictionary-to-list/m-p/5451344#M7984</guid>
      <dc:creator>Fabian11</dc:creator>
      <dc:date>2021-05-31T14:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: Python dictionary to list</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-dictionary-to-list/m-p/5451345#M7985</link>
      <description>&lt;P&gt;Iterate through the dictionary and test each row for the value you are looking for (such as SSID) and then change that one row.&lt;/P&gt;</description>
      <pubDate>Mon, 31 May 2021 23:31:28 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-dictionary-to-list/m-p/5451345#M7985</guid>
      <dc:creator>Philip D'Ath</dc:creator>
      <dc:date>2021-05-31T23:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: Python dictionary to list</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-dictionary-to-list/m-p/5451346#M7986</link>
      <description>&lt;P&gt;&lt;A href="https://community.meraki.com/t5/user/viewprofilepage/user-id/340"&gt;@Philip D'Ath&lt;/A&gt;Is correct and this is probably the easiest way to do it.&lt;/P&gt;&lt;P&gt;A simple for loop through networks and ssids will get you through the data you need to change. Something like the below.&lt;/P&gt;&lt;P&gt;nets = meraki.organizations.getOrganizationNetworks(organizationId)&lt;/P&gt;&lt;P&gt;for net in nets:&lt;/P&gt;&lt;P&gt;    ssids = meraki.wireless.getNetworkWirelessSsids(net['id'])&lt;/P&gt;&lt;P&gt;    for ssid in ssids:&lt;/P&gt;&lt;P&gt;        if ssid['name'] == "something":&lt;/P&gt;&lt;P&gt;            ssid.update({'psk' : 'newpassword'}) # use the update() function when working with dictionaries. #&lt;/P&gt;&lt;P&gt;            ssidChange = meraki.wireless.updateNetworkWirelessSsid(net['id'], **ssid) # the double * (**) will unpack the dictionary and allow you to post the full dictionary as the new variables. Be careful with this as you may get a return value that won't post.  &lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 00:50:10 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-dictionary-to-list/m-p/5451346#M7986</guid>
      <dc:creator>psteinbe</dc:creator>
      <dc:date>2021-06-01T00:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: Python dictionary to list</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-dictionary-to-list/m-p/5451347#M7987</link>
      <description>&lt;P&gt;The **ssid and ssid.update did the trick, this is awsome, thank you guys &lt;SPAN class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 06:02:15 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-dictionary-to-list/m-p/5451347#M7987</guid>
      <dc:creator>Fabian11</dc:creator>
      <dc:date>2021-06-01T06:02:15Z</dc:date>
    </item>
  </channel>
</rss>

