Started by Teresa PortelaSep 14, 2021

Open
How to split a string to get related data JAVA

0 VIEWES 0 LIKES 0 DISLIKES SHARE
0 LIKES 0 DISLIKES 0 VIEWES SHARE

I have string from which I am getting data in array but I am not getting way to get so that I get related data in array like my string is,

[{"Class Room": ["Windows",  "Windows1"],  "Staffroom": ["Windows",  "Windows1"]}],  "

here i have two dropdowns ,

"Class Room" having two values in dropdown Windows and Windows1

another drodown,

"Staffroom" having two values in dropdown Windows and Windows1

How would i get dropdown related value in array i can use split operation but cant getting logic

Above given string is in list, my code is ,

String[] data = list.toString().split(",");

But it split in array then I would not have related data

I want it to split in way so that I would get relative dropdown data in array,

 "Class Room": ["Windows",  "Windows1"], value in aray index 0
"Staffroom": ["Windows", "Windows1"]}] value in array index 1

0 Replies

You must be Logged in to reply
Techiio

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

facebooklinkdeintwitter

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Copyright techiio.com @2020 Kolkata, India
made with by Abhishek & Priyanka Jalan
Copyright techiio.com @2020
made with by Abhishek & Priyanka Jalan