Note that there are some explanatory texts on larger screens.

plurals
  1. POSort strings in dictionaries in an array by key?
    primarykey
    data
    text
    <p>I have a plist file containing data about people (name, title, phone, email). Instead of explaining, here is a sample showing the structure: </p> <pre><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt; &lt;plist version="1.0"&gt; &lt;dict&gt; &lt;key&gt;Kontakt&lt;/key&gt; &lt;array&gt; &lt;array&gt; &lt;dict&gt; &lt;key&gt;title&lt;/key&gt; &lt;string&gt;Teacher&lt;/string&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Adam Scott&lt;/string&gt; &lt;key&gt;phone&lt;/key&gt; &lt;string&gt;tel://1234-567890&lt;/string&gt; &lt;key&gt;email&lt;/key&gt; &lt;string&gt;adam.scott@email.com&lt;/string&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;title&lt;/key&gt; &lt;string&gt;Teacher&lt;/string&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Adam Scott&lt;/string&gt; &lt;key&gt;phone&lt;/key&gt; &lt;string&gt;tel://1234-567890&lt;/string&gt; &lt;key&gt;email&lt;/key&gt; &lt;string&gt;adam.scott@email.com&lt;/string&gt; &lt;/dict&gt; &lt;dict&gt; &lt;key&gt;title&lt;/key&gt; &lt;string&gt;Teacher&lt;/string&gt; &lt;key&gt;name&lt;/key&gt; &lt;string&gt;Adam Scott&lt;/string&gt; &lt;key&gt;phone&lt;/key&gt; &lt;string&gt;tel://1234-567890&lt;/string&gt; &lt;key&gt;email&lt;/key&gt; &lt;string&gt;adam.scott@email.com&lt;/string&gt; &lt;/dict&gt; &lt;/array&gt; &lt;/array&gt; &lt;/dict&gt; &lt;/plist&gt; </code></pre> <p>In code, I want to sort the strings for the key <strong><em>name</em></strong>. I am then going to display the sorted array in a table view. Do anyone know how to accomplish this?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload