Reads array into list of ANString, from [ until ] for the giving array name.
Works only when reading array of numeric values, not tested for arrays of strings.
See screenshot for what this function will be reading given array name.
Function ANStringListRead_JSON(ArrayName, FullJSONString)
' Reads array into list of ANString, from [ until ] for the giving array name
' > > > > Works only when reading array of numeric values, may not work fine for arrays of strings
' Needs VBINSTR, CutString
'
Rett = ""
Found1 = VBInstr(chr(34) & ArrayName & chr(34) , FullJSONString) ' Find "Symbol"
If Found1 = 0 Then GoTo ByeBye
Found2 = VBInstr(":", FullJSONString, Found1) ' Find : after word "Symbol"
If Found2 = 0 Then GoTo ByeBye
Rett = Trim(CutString(FullJSONString, "[", "]", Found1))
ByeBye:
ANStringListRead_JSON = Rett
End Function
' Reads array into list of ANString, from [ until ] for the giving array name
' > > > > Works only when reading array of numeric values, may not work fine for arrays of strings
' Needs VBINSTR, CutString
'
Rett = ""
Found1 = VBInstr(chr(34) & ArrayName & chr(34) , FullJSONString) ' Find "Symbol"
If Found1 = 0 Then GoTo ByeBye
Found2 = VBInstr(":", FullJSONString, Found1) ' Find : after word "Symbol"
If Found2 = 0 Then GoTo ByeBye
Rett = Trim(CutString(FullJSONString, "[", "]", Found1))
ByeBye:
ANStringListRead_JSON = Rett
End Function
ArrayName, FullJSONString
Views 161
Downloads 73
CodeID
DB ID