Yes.
var data = {
'PropertyA': 1,
'PropertyB': 2,
'PropertyC': 3
};
data["PropertyD"] = 4;
// dialog box with 4 in it
alert(data.PropertyD);
alert(data["PropertyD"]);
More Related Contents:
- What is the purpose of Node.js module.exports and how do you use it?
- Waiting for more than one concurrent await operation
- How to use jQuery to wait for the end of CSS3 transitions?
- How to get element by innerText
- Is it possible to use JavaScript to change the meta-tags of the page?
- What are the differences between Deferred, Promise and Future in JavaScript?
- How to insert a row in an HTML table body in JavaScript
- Calling dynamic function with dynamic number of parameters [duplicate]
- How can I get the index of an object by its property in JavaScript?
- Using execCommand (Javascript) to copy hidden text to clipboard
- Submit form fields inside display:none element
- How to automatically reload a web page at a certain time?
- What are Closures and Callbacks?
- Accessing the content of other tabs in a browser
- How to detect element being added/removed from dom element?
- Google Maps: How to create a custom InfoWindow?
- How to get year/month/day from a date object?
- Javascript file uploads [closed]
- While loop using bluebird promises
- Check if HTML snippet is valid with JavaScript
- Why are my JavaScript object properties being overwritten by other instances?
- JavaScript: How to get parent element by selector?
- How to update state with usestate in an array of objects?
- Passing variable in parent scope to callback function
- Why are function declarations handled differently in different browsers?
- Does strict mode work differently with React 18?
- ng-mouseover and leave to toggle item using mouse in angularjs
- Knockout JS mapping plugin without initial data / empty form
- Chart.js Line, different fill color for negative point
- Object is not extensible error when creating new attribute for array of objects