@serge any comparison of strings and nulls will result to false, putting null values at the end. No comments (// or /* */) are allowed in JSON data. In JavaScript objects store data in the form of key-value pairs where the key may be any property of the object. 2. Delf Stack is a learning website of different programming languages. Lets now make it a step further and discuss how we can achieve dynamic key behavior in javascript objects. if you change the a[property] < b[property] to a[property].localeCompare(b[property]), you can do a[property]?.localeCompare(b[property]) ?? An object is a collection of properties, and a property is an association between a name (or key) and a value. How to convert JSON string to array of JSON objects using JavaScript ? For transmitting binary data, the HTTP request is and the back-end (the code which is executed on the server), you can send JSON/XML and process them however you want. Edit: So almost 5 years later, this answer is getting downvotes because it's not creating an "normal" JS object literal (aka map, aka hash, aka dictionary). JavaScript Dynamic client-side scripting; JavaScript first steps. Note that the removed key does not exist, the value was not just set to undefined. To convert from CSV to JSON, first identify a list of keys for each JavaScript object by parsing the CSV headers, then add each key and value to a new object for each CSV row. Javascript