Join us on August 11th as we explore Emotion Classification on Video with phData Learn more

how to generate JSON from type select

Level 3
how to generate JSON from type select

we have created dss plugin with macros and we have runnable.json where we create UI and one of the requirement is to list users where we have users list from excel how to generate JSON from that same 

sample json as below, so now this JSOn is not accepted so we have to manually edit JSON that supports in DSS, we have around 1000 array objects but it is not feasible how to achieve this?

{
"label": "abc",
"options": [{
"label": "dss_training",
"value": "t::dss_training"
}
]
}, {
"label": "xyz",
"options": [{
"label": "dss_d",
"value": "id::dss_d"
}, {
"label": "dss_p",
"value": "id::dss_p"
}, {
"label": "dss_training",
"value": "id::dss_training"
}
]
}

7 Replies
Level 3
Author

Hi @Madhuri let me check

0 Kudos
Community Manager
Community Manager

What do you think @Marlan ?

Don't forget to mark as "Accepted Solution" when someone provides the correct answer to your question.
0 Kudos
Level 3

Hi, it sounds like issue is populating a select item in the macro UI from a list of around a 1000 users. So it doesn't seem to be same issue I was running into. 

Maybe the option to populate a select item from Python as described in the documentation (i.e., getChoicesFromPython) would be the way to go. Seems like a good fit for this use case.

Marlan 

 

  

Level 3
Author

hi @Marlan , thank you , i tried getChoicesFromPython and getting some error, as we have runnable.json for all UI controls, can we use getChoicesFromPython for just one dropdown? if we have multiple on same page?

 

any examples would help

0 Kudos
Level 3

Sorry, I don't have any examples as I have not used the Python option. Seems like it should work in your case but again, I haven't done it. 

Marlan

0 Kudos
Level 3
Author

thank you @Marlan let me check

0 Kudos