All Questions
254 questions
0
votes
3
answers
269
views
How do I reference a nested object or arrays path/location using a variable?
I have some data consisting of objects and array within an object as such:
let productDataObj = {
prodType1: {
keyTermsArr: [],
frequencyObj: {},
ratingObj: {}
},
prodType2: {
...
0
votes
1
answer
38
views
Why does changing the property of an object change the property of another in a list? [duplicate]
class myObj():
def __init__(self, pos_i, pos_j, pos_k, n = None, unique_property = []):
self.pos_i = pos_i
self.pos_j = pos_j
self.pos_k = pos_k
self....
0
votes
2
answers
39
views
Pivot and Reduce JS Object Array
I'm dealing with strange situation here..
I've an array something like below
var gblCalibrationData = [
{
"CalibrationYear": "2012",
"CalibrationData":...
1
vote
1
answer
62
views
Reduce JS object array with same DateTime into new object array with new fields
I'm having JS object array
var data = [
{
"TagName": "<DanPac_A>.<Daniel.DanOPCHub>.<FT35101A.Blocks_127.ProfileFactor>",
"TagValue":...
0
votes
3
answers
55
views
Reduce objects in a 2d array to a single property and assign new static keys
I have an array mind
[{"id":"331","file_name":"3b1379e2496408dd4c865f5f63f96bf6","file_path":"https://path/3b1379e2496408dd4c865f5f63f96bf6.png&...
0
votes
6
answers
63
views
How to get data inside a Nested Array of object
const datafromback=[[{name:ravi}],[{}],[{}],[{}]]
I want to access ravi. Can anyone help me how can i see ravi in my console.with dealing with nested arrays
I not getting approach but i can use map to ...
0
votes
0
answers
28
views
Is there a way to retrieve the object via url from array of array of objects, to perform axios operations(get,post,put,patch,delete)
const getOneEmployee = () => {
axios.get("localhost:4000/employees/[[]]")
.then((resp) => {
console.log(resp.data);
})
.catch(function (error) {
console.log(error);
})...
0
votes
0
answers
48
views
Java print array of integers while array is stored as an object
I am trying to make a program that will take any dimension size array, determine the dimension count, then loop through the array without using two for loops. It is an assignment for class. Basically, ...
1
vote
2
answers
332
views
Branching logic Quiz. Why is my quiz not moving to the next question?
I'm trying to develop logic for a quiz - Fiddle here. I've looked at similar projects such as here and here. However, their solutions did not work for my quiz; I'm using plain Javascript.
The question ...
-2
votes
2
answers
98
views
Find objects with duplicate value in an array [closed]
I want all the name1 and name2 to be unique in every sub-array
[
{ id: 1, name1: a, name2: b },
{ id: 2, name1: c, name2: d },
{ id: 3, name1: e, name2: a }
],
...
0
votes
1
answer
139
views
How can I do a reverse of json_decode(json_encode($), true)? [duplicate]
I have an array of objects, where I have an array with stdClass Object, here is ok, next I show a snipplet of array
Array
(
[0] => stdClass Object
(
[ID] => 5384
...
0
votes
2
answers
46
views
How to select all objects within an array by their key and add their values together?
So here's what I'm trying to do, I have an application I've been working on that allows users to read articles and take quizzes on them, each article is contained in a category. Category has an _id ...
0
votes
1
answer
83
views
IndexError: list index out of range for 2D list of objects
Here's my code:
class Grid:
def __init__(self):
self.matrix = [[Cell(i, j)] for j in range(5) for i in range(6)]
# Extra stuff
def enter_letter(self, letter):
if self....
0
votes
3
answers
352
views
Remove element from objects in javascript multidimensional array
I have read several solutions to this problem here. When I try it, I continue to receive an error for the pop() method.
I have what is essentially a multidimensional array in javascript.
I am tasked ...
0
votes
1
answer
32
views
How to flatten multi dimensional object which is in fact array in php?
So, i have multi dimensional - multi object array which looks something like this(just a snippet):
array(1) {
[0]=>
object(Justimmo\Model\Realty)#14 (136) {
["id":protected]=>
...