The data structure looks like:
var result={
"2":"3",
"3":{
"4":true,
"5":true
},
"8":"16",
"9":{
"19":false,
"20":true,
"21":false,
"22":false
}
}
Every item in it is a string. I want it to be in this format:
[2,3;3,4,5;8,16;9,20] or other formats are also acceptable, as long as it is This structure can
Note: Only when there are multiple parameters and the attribute is true can it be obtained
How to write using native JS? Thank you very much
For reference
https://jsfiddle.net/hsfzxjy/...
// [ '2:3', '3:4:5', '8:16', '9:20' ]