I have dynamic json example below:
{
"fields": {
"a": {
"#type": "textfield"
},
"d": {
"#type": "label"
},
"f": {
"#type": "email"
},
"g": {
"#type": "phone"
},
"j": {
"#type": "label"
}
}
}
based on the key label I need to split it into multiple json parts.
Example:
{
"fields": {
"a": {
"#type": "textfield"
}
}
{
"fields": {
"d": {
"#type": "label"
}
}
{
"fields": {
"f": {
"#type": "email"
},
"g": {
"#type": "phone"
},
}
{
"fields": {
"j": {
"#type": "label"
},
}
Note: the json structure can be increase or decrease bcaz its a dynamic data
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…