Questions tagged [nested-map]

63 questions
0
votes
1 answer

How to sort a nested map by inner keys descending order and then by inner values in ascending order?

I have a nested map Map for example ("Samsung", ("Note", 30)) ("Samsung", ("Galaxy", 20)) ("Apple", ("Iphone", 40)) I need to sort the map by inner key alphabetically in descending (in this example case - the model…
0
votes
2 answers

Nested mapping reactjs

I'm mapping a list of objects in my react app like follows (countrydata !== null) ? Object.keys(countrydata).map((item, key) => { return ( ) }) I also have an array which has the exact number of…
CraZyDroiD
  • 6,622
  • 30
  • 95
  • 182
0
votes
1 answer

Trying to parse a nested json and store in a nested Map. While reading it gives extra values in the Map. Code, output and json below

Map < String, Map < String, String >> appPayload = new HashMap < String, Map < String, String >> (); Map < String, String > featurePayload = new HashMap < String, String > (); JSONArray appList = new JSONArray(); JSONArray…
Neeraj
  • 11
  • 1
  • 2
0
votes
1 answer

Java8 Streams - How to modify value of keys of inner map to null object from "null" string

I have a utility method defined as below. public static Map> convertRawMapToStringValues(Map> cassandraRowsRawMap) { Map> cassandraStrValuesMap =…
adbdkb
  • 1,897
  • 6
  • 37
  • 66
0
votes
0 answers

Gaps in sass css output

I'm writing some sass to generate a set of icons based on a series of parameters. I have a function that analyses a set of variables and then returns a 'scenario' variable which in turn is used to filter the information taken from the nested map…
Stef
  • 359
  • 1
  • 4
  • 21
0
votes
1 answer

How to compare and sort nested Map in java based on Item price?

How to fix this issue/error ( How to sort nested TreeMap in java) When i am trying to sort Map using item price it is not working because TreeMap sort in natural order according to key but i need to sort this by using inner map key. any one help…
0
votes
3 answers

iterate, find and update value in nested Map

I have a YML file, which I parse to Map using yamlBeans library. I don't know how deep the nested map goes. for example: key1: key2: value1 key3: key4: value2 key5: value3 I need to find a specific value in this map, update it,…
barsi
  • 3
  • 1
  • 5
0
votes
1 answer

JS How to use nested map?

Here is the code, below the console.log part is my issue. It logs out all 3 classes of offset in a tag like this : But I just need 1 class of offset in a tag like this:
Cho Lin Tsai
  • 87
  • 1
  • 1
  • 10
0
votes
0 answers

Flatten nested map into rows

In clojure, how can I turn a nested map like this: {"1" {"1.1" {} "1.2" {}} "2" {"2.1" {} "2.2" {} "2.3" {}}} Into this: [["1" "1.1"] ["1" "1.2"] ["2" "2.1"] ["2" "2.2"] ["2" "2.3"]] Provided that nesting is not limited
0
votes
1 answer

Groovy - Change value of string in nested map

I have the following data structure in Groovy I want to know if Groovy offers a simple way (Preferably one-liner) to iterate through this data structure, find the TreeMap entry which has a key of "code" and apply the trim() function to it's value.…
user1066568
  • 717
  • 3
  • 15
  • 32
0
votes
1 answer

Automapper - Map custom object nested inside List of object

I need to map List to List, The issue is that Source contains NestedObject inside it & Dest also contains a NestedObject inside it. I need to map these two also while my List is being mapped. I have tried everything but either the…
zeppelin
  • 451
  • 1
  • 4
  • 24
0
votes
1 answer

Can't get appropriate output while concating string with nested map

I'm new with galang and I want to concat string with nested map. Below is the dummy code given, point out my mistake. Thanks in advance import ( "fmt" "strconv" ) func main() { str := "Hello @John martin #sosos &Hi @William…
Sohail Shaikh
  • 45
  • 1
  • 6
-1
votes
4 answers

in a nested map find key and update its value

find key : sum in nested map and update its value to : bill * 100 + : coins Need to pass test1 test "test1" do assert BcToInt.data(%{ count: 3, sum: %{bills: 1, coins: 99}, tax: %{count: 3, sum: %{bills: 1,…
Sana
  • 11
  • 4
-1
votes
2 answers

Java Nested map String array Looping Optional>>

I have an object of Optional>> How do I loop over each string in the array? The below code I am expecting "application" to be 'String' but it gives me 'String[]' Optional>> myObject = …
RocksAB
  • 9
  • 4
-1
votes
2 answers

Dart: How to iterate over objects in an array in a nested Map?

This is the current state of the Map data structure that I am working with in Dart: Map database = { 'campusConnect': { 'hashtags': [ { 'id': 4908504398, 'title': '#NeverGiveUp!', …
John Doe
  • 87
  • 1
  • 9