Yes.
var data = {
'PropertyA': 1,
'PropertyB': 2,
'PropertyC': 3
};
data["PropertyD"] = 4;
// dialog box with 4 in it
alert(data.PropertyD);
alert(data["PropertyD"]);
Related Contents:
- var functionName = function() {} vs function functionName() {}
- Getting the client’s time zone (and offset) in JavaScript
- What is the difference between ‘it’ and ‘test’ in Jest?
- Calculate text width with JavaScript
- Prevent browser caching of AJAX call result
- TypeError [ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string. Received type undefined raised when starting react app
- Detect viewport orientation, if orientation is Portrait display alert message advising user of instructions
- JS Client-Side Exif Orientation: Rotate and Mirror JPEG Images
- How to create a hash or dictionary object in JavaScript [duplicate]
- Mouseover or hover vue.js
- How can I find matching values in two arrays? [duplicate]
- How to remove all click event handlers using jQuery?
- Javascript ES6 computational/time complexity of collections
- Determine if ajax call failed due to insecure response or connection refused
- Operator precedence with JavaScript’s ternary operator
- Best way to perform a full text search in MongoDB and Mongoose
- How to use split?
- How to re-enable right click so that I can inspect HTML elements in Chrome?
- Disable time in bootstrap date time picker
- What limitations apply to opaque responses?
- Does JavaScript support array/list comprehensions like Python?
- Angular – ‘Could not find HammerJS’
- How can I round to whole numbers in JavaScript?
- Call javascript function after script is loaded
- How to window.scrollTo() with a smooth effect
- Does ES6 introduce a well-defined order of enumeration for object properties?
- how to remove key+value from hash in javascript
- How can I give keyboard focus to a DIV and attach keyboard event handlers to it?
- How to Zip files using JavaScript?
- Performance of key lookup in JavaScript object
- angular js: Prevent Bootstrap Modal from disappearing when clicking outside or pressing escape?
- How to use Array.prototype.filter with async?
- Is calling setTimeout with a negative delay ok?
- JavaScript memory limit
- How to get a reference to an iframe’s window object inside iframe’s onload handler created from parent window
- Check if a string contains any element of an array in JavaScript
- How do I pass along variables with XMLHTTPRequest
- jQuery + client-side template = “Syntax error, unrecognized expression”
- How to use Jest to test functions using crypto or window.msCrypto
- How to get first day of current year in javascript? [closed]
- What is difference between Map and Set?
- Case insensitive string replacement in JavaScript?
- Stop reloading page with ‘Enter Key’
- three.js – How can I dynamically change object’s opacity?
- How to update dependencies of dependencies using npm
- Accessing d3.js element attributes from the datum?
- Getting Google Maps link from place_id
- Bootstrap Collapse not Collapsing
- Android Keyboard shrinking the viewport and elements using unit vh in CSS
- d3js Tree square