Perl JSON arrays within a parent key
I have created a script to get some information from various external sources, the results should then be in json format. There is a lot of data and I push everything to an array in a loop, then print the…
I have created a script to get some information from various external sources, the results should then be in json format. There is a lot of data and I push everything to an array in a loop, then print the…
Looks like my main issue was using .val() when I should have been using map, thank you @Barmar! Though I'm still looking for a way to achieve the second array structure at the bottom of my post. It seems like…
Array field in collection: "fruits": [ "fruits": [ "fruits": [ {"fruit1": "banana"}, {"fruit2": "apple"}, {"fruit3": "pear"}, {"fruit2": "apple"}, {"fruit4": "orange"}, {"fruit2": "apple"}, {"fruit3": "pear"}, {"fruit1": "banana"}, {"fruit4": "orange"}, {"fruit4": "orange"} {"fruit3": "pear"} {"fruit1": "banana"} ] I need to find those…
I have a get request that retrieves data from a REST API. Below is the response. { "listCustomFields": [ { "configurationType": null, "errorDetails": null, "fieldId": "312329", "listItems": [ "Banking Services", "Business Banking", "Commercial", "Consumer Lending" ], "name": "Department Name", "required":…
I'm trying to make some very rudimental database mapping conversion where I'm fetching data from the database and then trying to convert that array to an instance of an arbitrary class. This should be dynamic so that I can use…
I am trying to split an array of space-delimited strings, group by a particular column, then store the data within each group in a more convenient structure. Sample data: $dataArray = [ 0 => "AAAAA 2023 01 25 01:04:00 ID:20fjrjeZZ",…
I have a JSON array in the following format: [["1234","OS","01/31/2023","02/01/2023","First Day"],["1245","OS","01/23/2023","01/24/2023","Last Day"],["3411","OS","09/21/2022","09/21/2022","Second Day"]] In Java, I would like to parse this array and store data in the following format: String[] firstElements = ["1234" , "1245", "3411"]; String[] secondElements = ["OS",…
I have an array of JSON like below const data = [ { "uniqueId": 1233, "serviceTags": [ { "Id": 11602, "tagId": "FRRRR", "missingRequired": [ ], "summaries": [ { "contract": "ACTIVE", }, { "contract": "INACTIVE", } ], "lttributes": { } }…
I want to find the time and temp in the row with maximum temp value in a 2d array. Here is sample data for my weather array: [ ['time' => '00:00', 'temp' => '15.1'], ['time' => '00:00', 'temp' => '15.1'],…
Hi I have an array that looks like this array[ 0 => array[ 'id' => 1, 'name' => 'Test 1' 'classId' => 3 ], 1 => array[ 'id' => 1, 'name' => 'Test 1' 'classId' => 15 ], 2 =>…