Top "Javascript-objects" questions

Use this tag for questions related to JavaScript objects.

Returning only certain properties from an array of objects in Javascript

If I have an object such that var object = function(key,text) { this.key = key; this.text = text; } And create …

javascript arrays javascript-objects
jQuery create object from form fields

How can I create a object with a form's fields and values? like this one: { fields: { name: 'foo', email: 'foo@…

javascript jquery forms javascript-objects
Efficiently rename/re-map javascript/json object keys within array of objects

I have some structured JSON data like so. Let's assume this is interchangeable, via JSON.parse(): [ { "title": "pineapple", "uid": "ab982…

javascript arrays json javascript-objects
Array of object deep comparison with lodash

I've 2 array of objects that I'd deeply compare with lodash However, I've a prob with it: > var x = [{a:1, …

javascript arrays javascript-objects lodash
Javascript creating objects - multiple approaches, any differences?

I have seen a few different ways to instantiate objects in javascript, wanted to know the benefits/drawbacks of the …

javascript javascript-objects
How to copy/clone a hash/object in JQuery?

I have a simple object (or hash) in Javascript: var settings = { link: 'http://example.com', photo: 'http://photos.com/me.…

javascript jquery copy clone javascript-objects
How create static functions/objects in javascript/nodejs (ES6)

I want to create a static class using Javascript/Node JS. I used google but i can't find any usefull …

javascript node.js ecmascript-6 javascript-objects
Underscore.js groupBy multiple values

Using Underscore.js, I'm trying to group a list of items multiple times, ie Group by SIZE then for each …

arrays underscore.js javascript-objects
Using reserved words as property names, revisited

Can a reserved word be used as an object's property name? This issue was raised indirectly in a previous Stack …

javascript json properties javascript-objects reserved-words
How to set up JavaScript namespace and classes properly?

It seems there are so many ways to set up a JavaScript application so it is confusing as to which …

javascript oop javascript-framework javascript-objects javascript-namespaces