Top "Object" questions

An object is any entity that can be manipulated by commands in a programming language.

Check if object value exists within a Javascript array of objects and if not add a new object to array

If I have the following array of objects: [ { id: 1, username: 'fred' }, { id: 2, username: 'bill' }, { id: 2, username: 'ted' } ] Is there a …

javascript arrays object for-loop foreach
Convert nested Python dict to object?

I'm searching for an elegant way to get data using attribute access on a dict with some nested dicts and …

python object dictionary
How do I create a dynamic key to be added to a JavaScript object variable

I'm trying something like this, but this example does not work. jsObj = {}; for (var i = 1; i <= 10; i++) { jsObj{'key' + …

javascript object
How to set a Javascript object values dynamically?

It's difficult to explain the case by words, let me give an example: var myObj = { 'name': 'Umut', 'age' : 34 }; var prop = …

javascript object properties set
What is the difference between "Class.forName()" and "Class.forName().newInstance()"?

What is the difference between Class.forName() and Class.forName().newInstance()? I do not understand the significant difference (I have …

java class object instantiation
Check if value exists in the array (AngularJS)

Currently I'm using the forEach()-method of angular to check the new value with the array of objects. But that's …

javascript arrays angularjs object angularjs-controller
TypeScript Objects as Dictionary types as in C#

I have some JavaScript code that uses objects as dictionaries; for example a 'person' object will hold a some personal …

arrays object dictionary typescript
How can I remove an element from a list, with lodash?

I have an object that looks like this: var obj = { "objectiveDetailId": 285, "objectiveId": 29, "number": 1, "text": "x", "subTopics": [{ "subTopicId": 1, "number": 1 }, { "subTopicId": 2, "number": 32 }, { "…

javascript arrays object lodash
Test for existence of nested JavaScript object key

If I have a reference to an object: var test = {}; that will potentially (but not immediately) have nested objects, something …

javascript object properties nested
Reverse of JSON.stringify?

I'm stringyfing an object like {'foo': 'bar'} How can I turn the string back to an object?

javascript json object