Category "object"

Dart: Object is giving output only once even when called multiple times

Hi I am trying to print value of 'a' property of x object but I only get output once. void main() { var x = Test("Boy"); x; x; x; x; x; x; } clas

sort objects by key value 0 by number size

how i can sort this object by user_id ? { key_1: { user_id: 3 }, key_2: { user_id: 1 }, key_3: { user_id: 2 } } I need this: { key_2: { user_id: 1 }, key_

How Do You Make an Object From an Inheritance Class in Java?

EDITED: Looks a little cleaner now, reflects where I currently am and what I'm trying to accomplish, and shows the new issue I'm working on (which has a comment

C# access to stack object property

How can I access the objects property in this situation? Araba araba = new Araba(); araba.Renk = "mavi"; araba.fiyat = 12345; // I created this class and it wo

How to convert array into JavaScript object

I have an array like this (which is similar to a JSON array) of length n: const mainData = [ { phrase: "Phrase 1", categorynumber: 1, optionnumber

Method returns NoneType object

Classes and Objects in Python I'm creating a bot in discord.py, and I have a class which stores all the information related to the user, like name, settings, pr

Why are all my variables objects instead of numerical values (int,float) when uploaded?

I just started so that might be stupid, but I have following problem: I created a .csv-file for some basic data description. However, although they are all nume

Typescript - Object display correct datas but properties are undefined on access

When I log the entire object all the datas are displayed but when I try to access the properties they are undefined. As if the object's properties where not map

given 2 arrays , create an object, matching the element of array1, with the key of the object of array2

I really don't know where I'm failing, I try 1000 ways, but I can't. function userCheck (arr1,arr2) { let map = {}; arr1.filter((user) => { arr2.f

Group Object based on ending Number

Here is the sample object { abc_0: 'a', bcd_0: 'b', cde_0: 'c', abc_1: 'a', bcd_1: 'b', cde_1: 'c', def_1: 'd', } I want to group via the number

I have some instances of a class and I pushed them into an array. Can I loop through the array and update the price of all the array objects?

I have a parent constructor like this: let list = []; class Pictures { constructor(price, title) { this.price = price; this.title = title;

How to validate list of email in winform C# with specific rules

Mine concern is the following. I have these 2 classes : public class Campaign { public string name { get; set; } public string description {

inverting object boolean property with ! vs =false , Is there any difference?

I am trying to make tic tac toe game in vanilla javascript. If I use ! to flip the value of object boolean property , it is changed to what it is defined in glo

A function to obtain all leaf node properties of an object in an array of string in javascript

Request you to please help in building a function in javascript to obtain the mentioned output from the input given. INPUT : An object (possibly a nested object

How can I access and process nested objects, arrays or JSON?

I have a nested data structure containing objects and arrays. How can I extract the information, i.e. access a specific or multiple values (or keys)? For examp

How can an object reference in java hold the reference to a primitive double dimensional int array [duplicate]

I have a piece of code- public class Sudoku { static int[][] game; public static void main(String[] args) { int [][] games= n

Sorting object property by values

If I have a JavaScript object such as: var list = { "you": 100, "me": 75, "foo": 116, "bar": 15 }; Is there a way to sort the properties based on

How to access a property inside an object and use in another method? javascript

I need to create a method to return a customers name and bank account value like so: *bank.printAccount('Sheldon'); // this should print 'Sheldon account is 0'*

Link between two JavaScript objects and then create condition

I have this set of data : [ { CIRPIC: 'SAL', ALLPIC: [7, 8, 9, 10] }, { CIRPIC: 'SUC', ALLPIC: [5, 6, 7] }, { CIRPIC: 'LI3', A

Comparison with the Method equal() [duplicate]

When i compare two instances in java of the same type class, with the same values of their Attributes, why i get false? I'm new with OOP and d