Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Ron Grajo
98
Views
1
Comments
JSONSelect and JSON_GetAttributes
Question
Forge
Hi,
does anyone have a sample on how to use these new functions? I'm actually thinking that this function is what I need for my current predicament but I'm not sure how this works.
Thanks,
Ron
Ricardo Silva
Hello,
Sorry for taking so long to answer, but I didn't notice the question here on the forum. If you want to ask a question about a specific component, you should use the discussion forums for that component as that'll alert at least the author :)
In any case, can you please elaborate on your predicament?
I would like to note that JSONSelect is not that new. It's been in ardoJSON almost from the beggining, although it has been recently changed a bit to a form that feels more useful.
There's nothing like experimenting a bit with the functions to evaluate if they fit the purpose you need, but here's a rundown of what they do. Imagine you have the following JSON:
{
"one": 1,
"two": 2,
"three": 3
}
If you JSONSelect(JSON, "one") you'll get 1
If you JSON_GetAttributes this JSON, you'll get a list with name / value pairs for the properties of this specific object:
[
{ name: "one", value: "1" },
{ name: "two", value: "2" },
{ name: "three", value: "3" }
]
This last one allows you to dynamically introspect JSON in your OutSystems Code.
Please let me know if these examples helped clarify what the functions do or if you need further clarification.
Best regards,
Ricardo Silva
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...