Category "object"

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

Trying to swap key value pairs of an object. Any advices?

Trying to swap key-value pairs of an object! // an object through we have to iterate and swap the key value pairs const product = { id: "FRT34495", price: 3

how to alter reduce function so it produce different result

I have this array: data: [ '+section1+', 'big text 1 here.', 'big text 2 here followed by list:', '-this is list item;', '-this is another list item;'

Transform array into object with custom properties

I have this array myarr = [ '=title1', 'longText0...', 'longtText1...', '=title2', 'longTextA...', 'longtTextB...', 'longtTextC...' ]; symbo

How to download CSV from a nested object in javascript?

I want to iterate over an object in Javascript and create a CSV file from its internal objects. const list = { "right": { "label": "Right",

How can the following: "axes.yaxis.set_major_formatter(FuncFormatter(f))" work since yaxis should be an attribute of AXIS and not of AXES objects?

Practicing on visualization as a Python newbie I have encountered this conceptual issue that got me thinking, Infact I managed to change the price format on the

Converting a class with java.lang.Object into Uni Mutiny returns null in API

I have a quarkus app that has a POST api returning a Uni . The structure of Test class class Test { String name; Object data; } I am passing the below as d

How can i use reduce or any other array method, to count and sum up specific properties?

I try to learn more about the array methods and also working with objects. I come up with this dummy example that simulate an incoming data. const data = [

How to convert a json response into a callable object in php?

I'm trying to convert the json response below in $response variable to a callable function like $response->getStatus() so it can return failed. Here's the re