Skip to main content
How are we doing? Please help us improve Stack Overflow. Take our short survey

All Questions

Tagged with
-1 votes
0 answers
20 views

understanding json_decode data [duplicate]

When I use json_decode and look at the results, I get a list of objects and arrays. I specifically want to retrieve one piece of information, but I'm not sure how to get it. I seem to have a stdClass ...
kenwat's user avatar
  • 1
-1 votes
0 answers
18 views

AsyncStorage React Native how can i store an object with multiple arrays inside?

i have been using asyncstore these days in react native and it works okay when storing tokens and simple objects. But i has a model like this (an object with arrays inside) "_id": { &...
Ismael Boff Lopez SkylakeFrost's user avatar
-1 votes
2 answers
44 views

keep getting TypeError: array.push is not a function when trying to push an object into an existing array with objects

I'm learning about localStorage and I'm trying to build a basic shopping cart function. The process is: user clicks on "Add To Cart" button. If localStorage("shoppingCart") doesn'...
Lexiriam's user avatar
2 votes
1 answer
34 views

Extract JSON array from object (redshift)

I need to extract data from an array nested inside an object (let's say the column it lives in is metadata). It looks like the following: { "name": "abc", "references&...
shellybeans's user avatar
0 votes
1 answer
39 views

How to render an object from a graphql database API fetch request in react native

Posting a request to the graphql API returns an object which can be observed in console log (see example output). The response can also be assigned to a variable intended to be rendered in a flatlist. ...
pmt1's user avatar
  • 1
0 votes
4 answers
66 views

Loop through array of objects, sum array elements and put result in last element

I have an array of objects as follows. Each object has an array P2 inside it. let input = [ { "P2": [ 6, 6, 0 ] }, { "P2": [ 3, 2, 0 ] }, { "P2": [ 5, 1, ...
Aren Trot's user avatar
  • 473
2 votes
3 answers
90 views

Find objects of a certain length inside the object

I need to go through the json object and find keys-objects, keys-arrays whose size matches a given value. I can't understand where to set the conditions. function traverse(obj, size) { for (let ...
Alexander Wang's user avatar
0 votes
0 answers
15 views

Create a tree array using string id in javascript [duplicate]

I have an array of comment and its replies as follows: [ { id:"comment 1", data: "data1", parent: "comment 0" }, { id:"comment 2", data: "data2", ...
VX7's user avatar
  • 23
0 votes
1 answer
90 views

use a value instead of an index in array object

I can't seem to format my array that is being saved to localStorage. Can you change the index value of an array? I have an array object like this: const myArray = [{id: 41, name: "x"}, {id: ...
artworkjpm's user avatar
  • 1,317
0 votes
1 answer
75 views

Append new keys to a JSON array

I have this JSON array that Zabbix retrieves as a string and each object has the keys "startTime" and "endTime" which are date-time strings in the format of "DD-MM-YYYY HH:mm:...
markfree's user avatar
  • 183
0 votes
0 answers
16 views

My data from axios doesn't save in my global variable [duplicate]

I just wrote a function to fetch users from "reqres.in" with axios. I just cant save the data in my global variable but in the function with console.log everything is fine! This is my code ...
Hoomaan's user avatar
  • 21
0 votes
1 answer
94 views

How can I make new arrays for each respective element inside of my object which consists of four arrays total to dynamically generate a week forecast?

I am back again! I am almost done with the same project from which my most recent question is also derived. I have hit a huge bump in the road. Pretty much, I am trying to make a 7 day forecast ...
vaahtlnirn1's user avatar
0 votes
4 answers
57 views

Advanced Filter array of objects based on condition if its nested object has required property in it

I am trying to solve a difficult computation but i am not reaching anywhere. can someone please help Here is a simple example. const filterCityBy = "NY"; const data = [ { name: "...
Aren Trot's user avatar
  • 473
0 votes
0 answers
39 views

UiPath : Read value as String from EventObjectIDType[]

I'm facing an issue to read a value from uipath workday - launch eib IntegrationEvent Output variable. See attached image for variable type and the value i want to read is the "a428838...0000&...
Bouzzz's user avatar
  • 13
0 votes
0 answers
41 views

Cloned copy of object is still referenced, arrays within becomes mutable [duplicate]

I have an object which I would like to clone. I would like that the questionsObj always remains the same. In my project I build the questionsObj with a bunch of imports of arrays like this: import ...
bikkeltio's user avatar
  • 107

15 30 50 per page
1
2 3 4 5
134