Quantcast
Channel: WinDev Forum
Viewing all articles
Browse latest Browse all 1914

Complex Variant structure

$
0
0
Hi,

Is it possible to create complex Variant in windev? Would it be possible to create a variant with the following structure? e.g. Where "itinerary Days" was nested within the top element and could have a variable number of elements? I understand how to create a variant with a flat structure but how to create a more complex one? The end goal here is to write code to read data and create a variant structure and then use "VariantToJSON" to create the JSON structure.

{
"id": 540,
"title": "14-Day Ultimate Namibia Safari",
"itinerary_days": [{
"DayNbr": 1,
"Title": "Day 1"
}, {
"DayNbr": 2,
"Title": "Day 2"
}, {
"DayNbr": 3,
"Title": "Day 3"
}, {
"DayNbr": 4,
"Title": "Day 4"
}, {
"DayNbr": 5,
"Title": "Day 5"
}, {
"DayNbr": 6,
"Title": "Day 6"
}, {
"DayNbr": 7,
"Title": "Day 7"
}, {
"DayNbr": 8,
"Title": "Day 8"
}, {
"DayNbr": 9,
"Title": "Day 9"
}, {
"DayNbr": 10,
"Title": "Day 10"
}, {
"DayNbr": 11,
"Title": "Day 11"
}, {
"DayNbr": 12,
"Title": "Day 12"
}, {
"DayNbr": 13,
"Title": "Day 13"
}, {
"DayNbr": 14,
"Title": "Day 14"
}]
}


Thanks!

steve

Viewing all articles
Browse latest Browse all 1914

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>