More info required.
Is this a 1 record, 1 time thing?
Or is it a recurring result from a recognized webservice?
Sandeep I realize this is only your second post here, but we need some facts/details to make a meaningful response. Forum participants are very good, but not clairvoyant.
Tell us in simple, plain English where the json data is coming from, the volume of data or requests and perhaps how and where it is used in/by your application.
Good luck with your project.
Here is small demo for your specific question
Code:
'===============
'---------------------------------------------------------------------------------------
' Procedure : parseAJsonString
' Author : mellon
' Date : 25-Aug-2017
' Purpose : parsing this specific json string as a demo
' see https://www.accessforums.net/showthread.php?t=67719
'[ { "street": "2 Willedrobe Rd.", "state": "IL", "zipcode": "67050", "city": "Indiana" }]
' remove all ddouble quotes from string
'---------------------------------------------------------------------------------------
'
Sub parseAJsonString()
Dim js As String
Dim i As Integer
Dim j As Integer
Dim arr
Dim Final
10 On Error GoTo parseAJsonString_Error
20 js = "[ { street: 2 Willedrobe Rd., state: IL, zipcode: 67050, city: Indiana }]"
30 arr = Split(js, ",") ' break json parts at comma to deal with individual name/value component
' Debug.Print UBound(arr)
40 For i = 0 To UBound(arr)
' Debug.Print arr(i) for testing
'remove json specific array, object markers
50 Final = Trim(Replace(arr(i), "[", ""))
60 Final = Trim(Replace(Final, "{", ""))
70 Final = Trim(Replace(Final, "}", ""))
80 Final = Trim(Replace(Final, "]", ""))
90 Final = Split(Final, ":")
100 Debug.Print Final(0) & vbTab & Final(1) ' name/value pair
110 Next
parseAJsonString_Exit:
120 Exit Sub
parseAJsonString_Error:
130 MsgBox "Error " & err.number & " in line " & Erl & " (" & err.Description & ") in procedure parseAJsonString of Module AWF_Related"
140 Resume parseAJsonString_Exit
End Sub
Result:
Code:
street 2 Willedrobe Rd.
state IL
zipcode 67050
city Indiana