Skip to main content

All Questions

Tagged with
0 votes
1 answer
34 views

Deserializing JSON list into class objects not able to extract attributes

I'm struggling to deserialize my json-file into an array of objects of my class LeagueAcc. I wanna fill a list with objects of class LeagueAcc called: accounts = [] I have loaded my JSON successfully ...
Peter K's user avatar
  • 59
-1 votes
0 answers
17 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
42 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
33 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
-2 votes
1 answer
55 views

TypeScript nested object how to access them?

I am working with a code that returns JSON | null type, hoping to change the value of a specific properties if those properties are some function... return { property_one: some_obj....
dessigma'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
63 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
  • 463
0 votes
1 answer
38 views

I have been trying to upload a file to an api but getting this error Objects are not valid as a React child, use an array instead

I have been trying to submit a file to my API but I am getting this: Objects are not valid as a React child. If you meant to render a collection of children, use an array instead. Below is my code ...
Harshdeep Singh's user avatar
1 vote
1 answer
67 views

Access nested objects in C#

I am trying to access specific properties from my object via Google Books API. The content is deserialized into two POCOs to access the nested object. I am stuck on is accessing the properties of ...
Juan21Guns's user avatar
0 votes
0 answers
13 views

gettng error"Converting circular structure to JSON"

I'm making a static website using react, boot strap and tailwind. Whenever I try to render Service.js file in react app using react router, I'm getting below error. Uncaught TypeError: Converting ...
Nishant gopinath's user avatar
2 votes
3 answers
89 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
28 views

ArgumentError: Unknown field error Ruby JSON.parse(json_string, object_class: XYZ)

My Ruby class Routeguide::Rectangle object looks like this, (Pay attention on lo & hi variables, those are objects of class Routeguide::Point) <Routeguide::Rectangle: lo: <Routeguide::Point: ...
Prateek Sen's user avatar
0 votes
0 answers
14 views

Creating an XML object collection

I have an XML file and that needs to be converted into a specific json format with Items in it. Items will be a collection where it can have 1 or 2 items in it based on my XML file. When i am `trying ...
Neha Rastogi's user avatar
0 votes
2 answers
91 views

Access inner keys in json data in typescript

I have this following object { "Monday": [ { "morning": [ { "start_time": "02:00", ...
user3653474's user avatar
  • 3,673

15 30 50 per page
1
2 3 4 5
326