Skip to main content

All Questions

Tagged with
-1 votes
1 answer
57 views

How to add objects to list without having array brackets

I have a for loop in which I add some attributes to the object and at the end I need to have a string (to pass it as a query parameter) I need {"items":[{"itemsCode":"item1&...
jacob1989's user avatar
-2 votes
1 answer
67 views

Create separate object of unique keys from array of object, JavaScript [closed]

How can we make separate objects of unique keys? Below is the sample array: var arr = [ {"name": "john"}, {"email": "[email protected]"}, {"phone": ...
Rajeev Thakur's user avatar
0 votes
0 answers
30 views

How to put items in an array to the object next to it in a json format in python?

I have a file of hundreds of json schemas that I need to parse through and fix the schema format in a way that the "isRelatedto" property will have an object(dictionary) without the extra ...
Lucy Zhang's user avatar
-4 votes
1 answer
37 views

Objects of array Group by object key

I have done a number of iterations but haven't achieved by expectation. I have array of Object like one pair below const data = [ { "credit_account_id": "244", ...
Mbanda's user avatar
  • 978
0 votes
2 answers
2k views

Fetching JSON data from array's array list in javascript

I am using JSON to store and retrieve some values from json file. I am trying to fetch the JSON data using javascript. The JSON data has array in array list. I am able to fetch the object list but ...
Venkat Sai's user avatar
-1 votes
1 answer
74 views

Removing duplicates fromarray of objects

I have an array of objects as myData which consists of the below JSON structure: const data = { myData: [ { Type: 'REAL', Tenure: '12', Name: 'WEBPAGE' }, { Type: 'REAL', Tenure: '...
user15754268's user avatar
0 votes
0 answers
260 views

How to parse a Arraylist nested Arraylist nested object from Json in Android studio [duplicate]

[ [ { "description": "", "product": "Apple", "quantity": "2" }, { ...
KaiWei Lee's user avatar
0 votes
2 answers
1k views

How to pass a List of String to a Object, when every string value have a key=value

I'm new to JavaScript and would like to know if there is a better way to transform a list string to an object. From a service I get the following list, but I need to transform it to an object to be ...
AntoCode's user avatar
  • 425
0 votes
2 answers
298 views

Retrieve dynamic objects within JSON object and put to an array Groovy

I'm new to Groovy and couldn't find any resources related to this. I'm trying to extract data from a "dates" object and put it in an array of fixed objects within it. The reason for it is ...
William Pham's user avatar
0 votes
1 answer
976 views

Add json file into object and saved into arraylist

I m trying get data from json file and saved as objects and then put into different arrylist, i m stuck on the point where i coundnt get "A320" into a obejcts, "type_ratings": [ &...
Jiayao Wang's user avatar
-1 votes
1 answer
75 views

New object getting overwritten with old object in loop in javascript

My expected output is like this but the new object overwrites the old object if the month is same. Can you spot what to fix? [ December: { 2: { id: 2, amount: 1000, date: "2020-12-...
Anshul Sharma's user avatar
0 votes
2 answers
2k views

Converting nested arrays to objects

[["seller" , [["id" , "1"], ["name", "test"]]], ["token", "aasfgsgd"], ["settings", [["general", false], [&...
user avatar
-2 votes
3 answers
49 views

Array of object according to key and values javascript

I have a array of object save data in an object according to its action_type key My Array Object data var jsonData = [ { "id":"1000000", "action_type":"sms" },{ "id":"...
Shubham Seth's user avatar
0 votes
3 answers
2k views

Writing JSONArray to file, only writes first collection of values

When the following code is executed, print function prints all the elements within the jsonarray, but the writer, only the first collection of elements. So far I've tried what is shown in the code, ...
Krow Caw's user avatar
0 votes
2 answers
381 views

Obtaining an array of json format question and put them into an array in android studio

The goal here is to retrieve JSON format data from an API, convert the data into an array in android studio. Then to display a random question into a text view and the question will not repeat itself. ...
Zack Cheang Weng Seong's user avatar

15 30 50 per page