Skip to main content

All Questions

Tagged with
0 votes
0 answers
26 views

Best practice instance objects - dictionary vs object

let's say I have a complexe object with hundrets of properties. Is there a real downside using dictionaries instead of hierarchical objects? In the past I used objects with complexe structure, but I ...
Doe's user avatar
  • 141
1 vote
0 answers
40 views

I want to display from date and to date on the frontend container from the json data

I have 4-5 containers in my html. Refer the sample code below. <div class="mainContainer"> <div class="subContainer"> <%--<button id="testdata" ...
Ashley Ferns's user avatar
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
0 votes
1 answer
51 views

Retrieve one object from a list of objects, but not by index[], but by a name of a field [duplicate]

At the end you can find the classes and Json file. How to retrieve one object from a list of objects, not by index[] but by a name of a field? I need to retrieve the full object. After I deserialize a ...
marcoqf73's user avatar
  • 1,324
0 votes
2 answers
77 views

Convert content to text parsing JSON URL response

I've got a url where the result is shown as below "playerInfo": { "059gh": { "eligiblePos": "Flx3,G,Flx,Flx2,PG", "...
mika_972's user avatar
0 votes
0 answers
47 views

MongoDB invalid character 'ÿ' looking for beginning of value

I am trying to add a database into mongodb atlas but the an error persist throughout all my json files. T Full error message: 2023-10-22T16:48:08.867+0800 Failed: error processing document #1: ...
Altuism's user avatar
0 votes
2 answers
66 views

Recurisve Object Transformation JS Utility - however nested values might be

i wish to make a utility function - which takes in an input - vanilla plain object - such that - it recursively traverses it to the deepest level even if a value is an array, it should iterate over ...
adme's user avatar
  • 15
0 votes
0 answers
26 views

How can I get children in a tree map from MongoDB to show up as an array inside a children key

I'm trying to achieve an output that resembles JSON where children in a tree map show under an object's "children" key. The reason I'm asking is because I'm using Primefaces (PrimeVue) and ...
Averroes's user avatar
1 vote
1 answer
41 views

sum the value inside array of objects based on multiple conditions

I have this object [ { "year": 2020, "term": 1, "worthAmountEGP": 0 }, { "year": 2020, ...
Mohamed Khalifa's user avatar
0 votes
1 answer
35 views

Merge array of objects based on overall key of object [duplicate]

I have this array of objects var worksSummaryDetailsArr = [ { year: 2020, worksSummaryDetailsObj: [ [Object], [Object], [Object], [Object] ] }, { year: 2021, ...
Mohamed Khalifa's user avatar
0 votes
0 answers
20 views

PHP Deserialize JSON array and Get object name [duplicate]

how to get the object name? e.g: “XXX.HOSTNAME” $json = '{ "XXX.HOSTNAME": { "IP": "123.195.214.93", "IP6": "", "...
Tang Fusheng's user avatar
0 votes
2 answers
96 views

Js extract information from a json

I have the following json that is quite complex and detailed. I need to extrapolate information (text) from the json only if the resource-id contains the following text "com.shazam.android:id/&...
Paul's user avatar
  • 4,302
0 votes
3 answers
88 views

PHP Get the value of every occurrence of a key in a multidimensional array

How would you extract every value of a key regardless of how deep or shallow it is in an array. Here is a sample JSON array. I want to grab every occurrence of "content" and concatenate them ...
Walrus's user avatar
  • 20.3k
0 votes
0 answers
13 views

undefined to get nested obj [duplicate]

i have value name='dropshiper.name', i want to get error from this errors[name], but the output is undefined. console.log(errors); output: { "email": { "type": "...
NoobMaster's user avatar
-3 votes
1 answer
64 views

How to store JSON data into an object after a fetch request?

I accessed a URL with a fetch request and do not know how to iterate through that data after fetching it. Here is my code var url = 'https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&...
jakepow07's user avatar

15 30 50 per page