Hi all
Can anybody tell me how can i fill a case statement with a jso file?
fir example my json is
And the case statemet is
Is it possible to create a case statement having parameters from json file?
And every time i change the json file the case statment will change without me having to go and ammend the code?
Can anybody tell me how can i fill a case statement with a jso file?
fir example my json is
Json file:
{
"myList": [
{
"Case1": "This is Case 1",
"Action1": "This is line 1",
"Bitmap": 1.bmp
},
{
"Case2": "This is Case 2",
"Action2": "This is line 2",
"Bitmap": 2.bmp
},
{
"Case3": "This is Case 3",
"Action3": "This is line 3",
"Bitmap": 3.bmp
},
{
"Case4": "This is Case 4",
"Action4": "This is line 4",
"Bitmap": 4.bmp
},
{
"Case5": "This is Case 5",
"Action5": "This is line 5",
"Bitmap": 5.bmp
},
{
"Case6": "This is Case 6",
"Action6": "This is line 6",
"Bitmap": 6.bmp
},
{
"Case7": "This is Case 7",
"Action7": "This is line 7",
"Bitmap": 7.bmp
}
]
}
And the case statemet is
B4X:
Select ActivityListMenu.result
Case "Case1"
Log (Action1)
Case "Case2"
Log (Action2)
Case "Case3"
Log (Action3)
Case "Case4"
Log (Action4)
Case "Case5"
Log (Action5)
Case "Case6"
Log (Action6)
Case Else
Log("Larger than 9")
End Select
And every time i change the json file the case statment will change without me having to go and ammend the code?