Hi,
I am using the sample code of Json item.
I am trying to convert Listbox row into Json item
Var Person As New JSONItem
Person.Value("no") = "auto"
Person.Value("dt") = "09/03/2022 00:00"
Person.Value("locCode") = "ASBH"
Person.Value("custCode") = "RTL"
Person.Value("ptypeCode") = "EDC"
Person.Value("ptermCode") = "CASH"
Person.Value("cashier") = "100"
Person.Value("remark") = "test API"
Person.Value("sourceTransId") = ""
Person.Value("incTax") = "true"
Var Kids As New JSONItem
dim i as integer
for i = 0 to Listbox1.ListCount-1
Kids.Add("itemCode"+":"+Listbox1.cell(i,0))
next
Kids.RemoveAt(2)
Person.Value("items") = Kids
Person.Compact = True
Var s As String = Person.ToString
so far its working, but there is a quotation symbol missing in this line,
for i = 0 to Listbox1.ListCount-1
Kids.Add("itemCode"+":"+Listbox1.cell(i,0))
next
the result that I am expecting is,
"itemCode": "AS000202",
but I got
itemCode: AS000202
is there any better simple way to convert listbox row into Json.
thanks
arief