All Questions
4,888
questions
-2
votes
2
answers
42
views
I want to return a key using Lodash when it contains a particular value
I have an object like this:
const obj = {
'MONEY-OUT': {
USD: ['a', 'b', 'c'],
EUR: ['d', 'e', 'f'],
},
'MONEY-IN': {
USD: ['g', 'h', 'i'],
EUR: ['j', 'k', 'l'],
},
};
and I ...
-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 ...
0
votes
1
answer
37
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 ...
-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": {
&...
-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'...
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&...
-2
votes
1
answer
60
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....
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. ...
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, ...
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 ...
1
vote
1
answer
69
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 ...
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 ...
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 ...
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",
...
0
votes
1
answer
29
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: ...