<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: DevonLad</title>
    <description>The latest articles on DEV Community by DevonLad (@devon1971).</description>
    <link>https://dev.to/devon1971</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3736108%2F6d24cf2b-eb5b-45ef-bf89-84b7fad942c8.png</url>
      <title>DEV Community: DevonLad</title>
      <link>https://dev.to/devon1971</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/devon1971"/>
    <language>en</language>
    <item>
      <title>Javascript / JSON,</title>
      <dc:creator>DevonLad</dc:creator>
      <pubDate>Tue, 27 Jan 2026 22:06:45 +0000</pubDate>
      <link>https://dev.to/devon1971/javascript-json-2k90</link>
      <guid>https://dev.to/devon1971/javascript-json-2k90</guid>
      <description>&lt;p&gt;I have a JSON file that I wish to sort by a certain field.&lt;/p&gt;

&lt;p&gt;I have found the code I am using works fine for sorting strings but when passed a key that is a integer or array an error message is thrown.&lt;/p&gt;

&lt;p&gt;I have created a very small version as an example, this can be found in this JSFiddle; [(&lt;a href="https://jsfiddle.net/a4poster/54hjyrnt/)" rel="noopener noreferrer"&gt;https://jsfiddle.net/a4poster/54hjyrnt/)&lt;/a&gt;]&lt;/p&gt;

&lt;p&gt;For example on line 37 - &lt;br&gt;
&lt;em&gt;search_venueDB = approach2Fn(venueDB, "country");&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If I change this to:&lt;br&gt;
_search_venueDB = approach2Fn(venueDB, "active");&lt;/p&gt;

&lt;p&gt;or&lt;/p&gt;

&lt;p&gt;search_venueDB = approach2Fn(venueDB, active);_&lt;/p&gt;

&lt;p&gt;an error message is thrown.&lt;/p&gt;

&lt;p&gt;I know for the JSON in this example I could use a simple for loop but the actual JSON file is a lot larger.&lt;/p&gt;

&lt;p&gt;I am a relative newbie to Javascript, so please be lenient with me.  Is their is a better way then I am open to ideas.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>json</category>
    </item>
  </channel>
</rss>
