Category "object"

How to detect if a variable is a pure javascript object

I have a function I need to pass an object to. I use typeof operator to make a check before processing. But looking at this link, it appears that many javascrip

How to rename iterably object properties

Every Object properties have underscored the first letter; I wanna delete this first substring, and try the string method "replace" to all object properties, bu

What are these 2 files in the CenterNet MobileNetV2 from the Tensorflow OD model zoo?, Do we need them?

Do we need these files?, The Tensorflow Doc don't say anything about them

Accessing a JSON array inside of a JSON object in Android Studio

I am testing my knowledge and ability with android studio and API's, I have been using volley and I have come across a little problem. The API I have been using

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

searching in arraylist always not found

no matter what I use indexof() or contains or .equals() changing everything to uppercase or to lowercase It always return false and not found can someone please

How to map more than one property from an array of objects

I have an array of Object as follows: var obj = [ {a: 1, b: 5, c: 9}, {a: 2, b: 6, c: 10}, {a: 3, b: 7, c: 11}, {a: 4, b: 8, c: 12} ]; I know about how

What is the most efficient way to deep clone an object in JavaScript?

What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but that's non-standard and only sup

handle multiple checkboxes and complex data structure (reactjs)

Since I am pretty new to React and also not a huge expert on JS especially ES6, I wonder how to make my code (that works) prettier and refactor it. I want to h

Unable to retrieve the correct value from a list of object within object

I am quite new to javascript and I've been struggling with this type of challenge. I understand the problem and implement a logic to solve the issue but I am un

Unable to retrieve the correct value from a list of object within object

I am quite new to javascript and I've been struggling with this type of challenge. I understand the problem and implement a logic to solve the issue but I am un

JavaScript object assignment: unexpected behaviour

Suppose we have two objects: var a = { foo: { bar: 1 } } var b = { foo: { bar: 2 } } If I set the object b to a (a = b), I expect that a takes the value of b

Calling a native C++ method from C++/CLI

I'm developing Wordle in C++ using a .net graphic interface with visual studio. I have a file.h that contains a class "WordDatabase", and I need to use one of t

Modifying a copy of a JavaScript object is causing the original object to change

I am copying objA to objB const objA = { prop: 1 }, const objB = objA; objB.prop = 2; console.log(objA.prop); // logs 2 instead of 1 same problem for Arrays

How to check an empty object?

I have a number of objects. Some of them have string properties and some of them have bool properties. I'm using them in multi-step form. so each step is bound

Parse JSON String into a Particular Object Prototype in JavaScript

I know how to parse a JSON String and turn it into a JavaScript Object. You can use JSON.parse() in modern browsers (and IE9+). That's great, but how can I t

Is there a way to convert an Object[] array to char[] array?

class Solution { char[] make(String s){ Stack<Character> st= new Stack<Character>(); for(char c:s.toCharArray()){ if

How to loop and display array of objects and their nested arrays

I need help, I got stuck on objects with multiple nested arrays. I have a json file which consists of object, that holds array of objects, and these objects hav

Nested objects in response not logging to console

My server gets a response from another server with a document from a mongodb database with a body similar to { messageDetails: { body: "hello" }

Is there an Object spread syntax in python 2.7x like in Javascript?

How can I spread an objects/dict(?) properties and into a new object/dict? Simple Javascript: const obj = {x: '2', y: '1'} const thing = {...obj, x: '1'} // t